feat:对接评论接口

This commit is contained in:
Xwen
2023-12-16 14:51:30 +08:00
parent a5c980626b
commit aa519f764f
2 changed files with 3 additions and 3 deletions

View File

@@ -15,10 +15,10 @@ export function add(data) {
});
}
export function del(data) {
export function del(code) {
return request({
url: `/comment`,
method: "delete",
data: data,
data: "string" == typeof code ? [code] : code,
});
}

View File

@@ -196,7 +196,7 @@ const delComment = async (ids) => {
cancelButtonText: "取消",
type: "warning",
}).then(async () => {
await del({ id: [ids] });
await del(ids);
await loadComment();
ElMessage({
message: "评论已删除!",