YY před 2 roky
rodič
revize
0548b75953
1 změnil soubory, kde provedl 8 přidání a 6 odebrání
  1. 8 6
      src/views/selfShop/notice/index.vue

+ 8 - 6
src/views/selfShop/notice/index.vue

@@ -134,12 +134,14 @@ export default {
     },
     // 修改
     async toView({ data }) {
-      if (data.source_type == '0') this.$router.push({ path: `/selfShop/order`, query: { id: data.source_id } });
-      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 (data.source_type) {
+        if (data.source_type == '0') this.$router.push({ path: `/selfShop/order`, query: { id: data.source_id } });
+        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();
+        }
       }
     },
     // 已读