From aa519f764f3850aa5e49d86a7d3d86fc50e29d27 Mon Sep 17 00:00:00 2001 From: Xwen <929716663@qq.com> Date: Sat, 16 Dec 2023 14:51:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AF=B9=E6=8E=A5=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Bbs.Vue3/src/apis/commentApi.js | 4 ++-- Yi.Bbs.Vue3/src/components/CommentInfo.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Yi.Bbs.Vue3/src/apis/commentApi.js b/Yi.Bbs.Vue3/src/apis/commentApi.js index 1615c9d9..64ad4e9a 100644 --- a/Yi.Bbs.Vue3/src/apis/commentApi.js +++ b/Yi.Bbs.Vue3/src/apis/commentApi.js @@ -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, }); } diff --git a/Yi.Bbs.Vue3/src/components/CommentInfo.vue b/Yi.Bbs.Vue3/src/components/CommentInfo.vue index 15863ef7..b12b813a 100644 --- a/Yi.Bbs.Vue3/src/components/CommentInfo.vue +++ b/Yi.Bbs.Vue3/src/components/CommentInfo.vue @@ -196,7 +196,7 @@ const delComment = async (ids) => { cancelButtonText: "取消", type: "warning", }).then(async () => { - await del({ id: [ids] }); + await del(ids); await loadComment(); ElMessage({ message: "评论已删除!",