docs: 将"域名"统一修改为"站点"
更新文档和前端界面中的术语,将"按域名统计"改为"按站点统计",使术语更准确。 同时修复默认站点ID的处理逻辑,并添加缺失的统计API路由。
This commit is contained in:
@@ -217,11 +217,11 @@ function cycleTheme() {
|
|||||||
|
|
||||||
type SiteOption = { label: string; value: string };
|
type SiteOption = { label: string; value: string };
|
||||||
const siteOptions = ref<SiteOption[]>([]);
|
const siteOptions = ref<SiteOption[]>([]);
|
||||||
const defaultSiteId = "";
|
const defaultSiteId = "default";
|
||||||
|
|
||||||
function getSiteLabel(value: string) {
|
function getSiteLabel(value: string) {
|
||||||
if (!value) {
|
if (!value || value === "default") {
|
||||||
return "默认站点 (Default)";
|
return "默认站点";
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-title-row">
|
<div class="card-title-row">
|
||||||
<h3 class="card-title">按域名统计</h3>
|
<h3 class="card-title">按站点统计</h3>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="statsLoading" class="page-hint">加载中...</div>
|
<div v-if="statsLoading" class="page-hint">加载中...</div>
|
||||||
<div v-else-if="statsError" class="page-error">{{ statsError }}</div>
|
<div v-else-if="statsError" class="page-error">{{ statsError }}</div>
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ app.get('/admin/export/config', exportConfig);
|
|||||||
app.post('/admin/import/config', importConfig);
|
app.post('/admin/import/config', importConfig);
|
||||||
app.get('/admin/export/stats', exportStats);
|
app.get('/admin/export/stats', exportStats);
|
||||||
app.post('/admin/import/stats', importStats);
|
app.post('/admin/import/stats', importStats);
|
||||||
|
app.get('/admin/stats/comments', getStats);
|
||||||
app.get('/admin/export/backup', exportBackup);
|
app.get('/admin/export/backup', exportBackup);
|
||||||
app.post('/admin/import/backup', importBackup);
|
app.post('/admin/import/backup', importBackup);
|
||||||
app.put('/admin/comments/status', updateStatus);
|
app.put('/admin/comments/status', updateStatus);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Authorization: Bearer <token>
|
|||||||
GET /admin/stats/comments
|
GET /admin/stats/comments
|
||||||
```
|
```
|
||||||
|
|
||||||
用于管理后台「数据看板」展示评论整体统计、按域名统计以及最近 30 天评论趋势。
|
用于管理后台「数据看板」展示评论整体统计、按站点统计以及最近 30 天评论趋势。
|
||||||
|
|
||||||
- 方法:`GET`
|
- 方法:`GET`
|
||||||
- 路径:`/admin/stats/comments`
|
- 路径:`/admin/stats/comments`
|
||||||
|
|||||||
Reference in New Issue
Block a user