Jelajahi Sumber

优化修改

sunny 2 bulan lalu
induk
melakukan
f066436d92

+ 5 - 2
src/views/historicalVisit/historAllVisit.vue

@@ -264,11 +264,14 @@ export default {
     };
   },
   activated() {
-    let type = this.$route.query.type;  
-    if(this.latestUpdateTime!=null && type == 1){ 
+    let typeQuery = localStorage.getItem('typeQuery');
+    if(this.latestUpdateTime!=null && typeQuery == 1){ 
       this.getListTotalFn();
     }
   },
+  deactivated(){
+    localStorage.setItem('typeQuery', 1);
+  },
   created() {
     this.info();
     this.userList = [];

+ 1 - 6
src/views/historicalVisit/historicalDetails.vue

@@ -434,12 +434,7 @@ export default {
           path: '/historicalVisit',
         });
       } else {
-         this.$router.push({
-            path: '/historAllVisit',
-            query: {
-              type: 1,
-            },
-          });
+        this.$router.go(-1);
       }
     },
   },

+ 7 - 1
src/views/week/index.vue

@@ -47,7 +47,7 @@
               <van-icon :name="storeselect" class="zicon" />
             </template>
           </van-cell>
-          <van-cell title="历史拜访" is-link to="/historAllVisit?type=0">
+          <van-cell title="历史拜访" is-link @click="historAllVisit()">
             <template #icon>
               <van-icon :name="history" class="zicon" />
             </template>
@@ -318,6 +318,12 @@ export default {
     this.getReportInfo();
   },
   methods: {
+    historAllVisit(){
+      localStorage.setItem('typeQuery', 0);
+      this.$router.push({
+        path: '/historAllVisit',
+      });
+    },
     getstoreCoverPosition() {
       getstoreCoverPosition({}).then((res) => {
         var postName = localStorage.getItem('postName');