natasha 5 days ago
parent
commit
7cc3be644b
1 changed files with 22 additions and 14 deletions
  1. 22 14
      src/views/reporter/components/ReportDetail.vue

+ 22 - 14
src/views/reporter/components/ReportDetail.vue

@@ -305,24 +305,32 @@ export default {
       });
     },
     deleteCmt(item) {
-      let MethodName = "/PaperServer/Client/Xjz/XjzArticleDelComment";
-      let data = {
-        art_id: this.info.id,
-        id: item.id,
-      };
-      getLogin(MethodName, data).then((res) => {
-        if (res.status === 1) {
-          let MethodNames = "/PaperServer/Client/Xjz/XjzArticleDetail";
-          let datas = {
-            id: this.info.id,
+      this.$confirm("确定要删除此评论吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let MethodName = "/PaperServer/Client/Xjz/XjzArticleDelComment";
+          let data = {
+            art_id: this.info.id,
+            id: item.id,
           };
-          getLogin(MethodNames, datas).then((res) => {
+          getLogin(MethodName, data).then((res) => {
             if (res.status === 1) {
-              this.infoDetail.comment_list = res.data.comment_list;
+              let MethodNames = "/PaperServer/Client/Xjz/XjzArticleDetail";
+              let datas = {
+                id: this.info.id,
+              };
+              getLogin(MethodNames, datas).then((res) => {
+                if (res.status === 1) {
+                  this.infoDetail.comment_list = res.data.comment_list;
+                }
+              });
             }
           });
-        }
-      });
+        })
+        .catch(() => {});
     },
     // 点赞/取消赞
     handleLike(item) {