feat(widget): 支持通过 siteId 隔离不同站点的评论数据

- 在配置界面添加 siteId 输入项,用于区分不同站点/环境的评论
- 更新 API 客户端,将 postSlug 参数改为 postUrl 以保持一致性
- 在开发配置中默认添加 siteId 字段,并同步到存储和初始化逻辑
This commit is contained in:
anghunk
2026-02-09 14:15:16 +08:00
parent 32603d281a
commit 2453929455
3 changed files with 12 additions and 3 deletions

View File

@@ -139,7 +139,7 @@ export function createApiClient(config) {
async function getLikeStatus() {
const params = new URLSearchParams({
post_slug: config.postSlug
post_slug: config.postUrl
});
const headers = {
'X-CWD-Like-User': getLikeUserId()