diff --git a/cwd-admin/src/views/LayoutView/index.vue b/cwd-admin/src/views/LayoutView/index.vue index 879da16..e05caae 100644 --- a/cwd-admin/src/views/LayoutView/index.vue +++ b/cwd-admin/src/views/LayoutView/index.vue @@ -217,11 +217,11 @@ function cycleTheme() { type SiteOption = { label: string; value: string }; const siteOptions = ref([]); -const defaultSiteId = ""; +const defaultSiteId = "default"; function getSiteLabel(value: string) { - if (!value) { - return "默认站点 (Default)"; + if (!value || value === "default") { + return "默认站点"; } return value; } diff --git a/cwd-admin/src/views/StatsView/index.vue b/cwd-admin/src/views/StatsView/index.vue index 3e5a99d..77db3d9 100644 --- a/cwd-admin/src/views/StatsView/index.vue +++ b/cwd-admin/src/views/StatsView/index.vue @@ -74,7 +74,7 @@
-

按域名统计

+

按站点统计

加载中...
{{ statsError }}
diff --git a/cwd-api/src/index.ts b/cwd-api/src/index.ts index 8f90091..c716df9 100644 --- a/cwd-api/src/index.ts +++ b/cwd-api/src/index.ts @@ -292,6 +292,7 @@ app.get('/admin/export/config', exportConfig); app.post('/admin/import/config', importConfig); app.get('/admin/export/stats', exportStats); app.post('/admin/import/stats', importStats); +app.get('/admin/stats/comments', getStats); app.get('/admin/export/backup', exportBackup); app.post('/admin/import/backup', importBackup); app.put('/admin/comments/status', updateStatus); diff --git a/docs/api/admin/stats.md b/docs/api/admin/stats.md index 39b3338..8a84c8d 100644 --- a/docs/api/admin/stats.md +++ b/docs/api/admin/stats.md @@ -14,7 +14,7 @@ Authorization: Bearer GET /admin/stats/comments ``` -用于管理后台「数据看板」展示评论整体统计、按域名统计以及最近 30 天评论趋势。 +用于管理后台「数据看板」展示评论整体统计、按站点统计以及最近 30 天评论趋势。 - 方法:`GET` - 路径:`/admin/stats/comments`