Files
cwd/docs/common-problems.md
anghunk 3b429bf82c docs: 补充多站点数据隔离的配置和API文档
- 在站点隔离配置文档中详细说明 siteId 的使用方法和注意事项
- 为公开API接口添加 siteId 查询参数和请求头说明
- 更新前端配置文档,明确 siteId 为可选参数并说明默认值
- 修正常见问题中的表述和格式问题
2026-02-09 15:00:19 +08:00

19 lines
706 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 常见问题
## 1. 为什么设置完 siteId 后,评论区不显示旧的评论数据?
因为设置了 siteId 后,接口会根据 siteId 来查询数据库带有你设置的 siteId 的评论数据。所以如果设置了 siteId旧数据就有可能不显示需要手动去 Cloudflare D1 控制台 Query 运行 SQL 语句来更新数据。
- `abc` 你要设置的 siteId
- `example.com` 查找包含指定域名的评论数据
```sql
UPDATE Comment
SET site_id = 'abc'
WHERE post_url LIKE '%example.com%';
```
运行以上 SQL 语句后,评论区就会显示带有 `abc` siteId 的评论数据了。
![](https://github.com/user-attachments/assets/ccfb31c9-8001-4174-b918-d3d8826c6617)