feat:对接评论接口
This commit is contained in:
@@ -15,10 +15,10 @@ export function add(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function del(data) {
|
export function del(code) {
|
||||||
return request({
|
return request({
|
||||||
url: `/comment`,
|
url: `/comment`,
|
||||||
method: "delete",
|
method: "delete",
|
||||||
data: data,
|
data: "string" == typeof code ? [code] : code,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ const delComment = async (ids) => {
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
await del({ id: [ids] });
|
await del(ids);
|
||||||
await loadComment();
|
await loadComment();
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: "评论已删除!",
|
message: "评论已删除!",
|
||||||
|
|||||||
Reference in New Issue
Block a user