YY 2 éve
szülő
commit
7ac27e1056
1 módosított fájl, 2 hozzáadás és 7 törlés
  1. 2 7
      src/views/selfShop/notice/index.vue

+ 2 - 7
src/views/selfShop/notice/index.vue

@@ -150,9 +150,7 @@ export default {
         else if (data.source_type == '1') this.$router.push({ path: `/selfShop/sales`, query: { id: data.source_id } });
         let info = { _id: data._id, status: '1' };
         let res = await this.update(info);
-        if (this.$checkRes(res)) {
-          this.search();
-        }
+        if (this.$checkRes(res)) this.search();
       }
     },
     // 已读
@@ -163,10 +161,7 @@ export default {
     },
     async toDelete({ data }) {
       let res = await this.delete(data._id);
-      if (this.$checkRes(res)) {
-        this.$message({ type: `success`, message: `刪除信息成功` });
-        this.search();
-      }
+      if (this.$checkRes(res, '刪除信息成功', `${res.errmsg}`)) this.search();
     },
     // 查询其他信息
     async searchOthers() {