feat(admin): 添加评论按域名筛选功能并调整统计页面布局

- 在评论管理页面添加域名筛选功能
- 调整统计页面中卡片顺序,将图表移至概览下方
- 更新文档添加版本更新警告提示
- 修改评论列表API支持域名参数查询
This commit is contained in:
anghunk
2026-01-21 13:37:55 +08:00
parent bbe2bdd820
commit 8fa8748949
5 changed files with 72 additions and 18 deletions

View File

@@ -93,8 +93,13 @@ export function logoutAdmin(): void {
localStorage.removeItem('cwd_admin_token');
}
export function fetchComments(page: number): Promise<CommentListResponse> {
return get<CommentListResponse>(`/admin/comments/list?page=${page}`);
export function fetchComments(page: number, domain?: string): Promise<CommentListResponse> {
const searchParams = new URLSearchParams();
searchParams.set('page', String(page));
if (domain) {
searchParams.set('domain', domain);
}
return get<CommentListResponse>(`/admin/comments/list?${searchParams.toString()}`);
}
export function deleteComment(id: number): Promise<{ message: string }> {