feat(评论): 添加评论置顶功能
- 在评论表中添加 priority 字段用于控制置顶权重 - 修改所有评论查询接口按 priority 和 created 排序 - 在管理后台添加置顶权重编辑功能 - 在评论列表显示置顶标识
This commit is contained in:
@@ -18,6 +18,7 @@ export type CommentItem = {
|
||||
contentText: string;
|
||||
contentHtml: string;
|
||||
status: string;
|
||||
priority?: number;
|
||||
ua?: string | null;
|
||||
};
|
||||
|
||||
@@ -118,6 +119,7 @@ export function updateComment(data: {
|
||||
postSlug?: string;
|
||||
contentText: string;
|
||||
status?: string;
|
||||
priority?: number;
|
||||
}): Promise<{ message: string }> {
|
||||
return put<{ message: string }>('/admin/comments/update', {
|
||||
id: data.id,
|
||||
@@ -126,7 +128,8 @@ export function updateComment(data: {
|
||||
url: data.url ?? null,
|
||||
postSlug: data.postSlug,
|
||||
content: data.contentText,
|
||||
status: data.status
|
||||
status: data.status,
|
||||
priority: data.priority
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user