Browse Source

修改代码202107221453

fanghuisheng 4 years ago
parent
commit
9556149f9c
2 changed files with 1 additions and 7 deletions
  1. 1 1
      src/views/home/index.vue
  2. 0 6
      src/views/index.vue

+ 1 - 1
src/views/home/index.vue

@@ -398,7 +398,7 @@ export default {
           localStorage.clear();
           localStorage.clear();
           this.$router.push({ path: "/Overview" });
           this.$router.push({ path: "/Overview" });
           this.$store.commit("increment", val.id);
           this.$store.commit("increment", val.id);
-          this.$store.state.query = [val.id, val.siteName];
+          localStorage.setItem("Overview", [val.id, val.siteName]);
         });
         });
         return marker;
         return marker;
       });
       });

+ 0 - 6
src/views/index.vue

@@ -119,11 +119,6 @@ export default {
     },
     },
   },
   },
   watch: {
   watch: {
-    "$store.state.query"() {
-      this.value = parseInt(this.$store.state.query[0]);
-      this.name = this.$store.state.query[1];
-      localStorage.setItem("Overview", [this.value, this.name]);
-    },
     value(val) {
     value(val) {
       this.$store.commit("increment", val);
       this.$store.commit("increment", val);
     },
     },
@@ -149,7 +144,6 @@ export default {
       ) {
       ) {
         this.value = parseInt(getlocal.split(",")[0]);
         this.value = parseInt(getlocal.split(",")[0]);
         this.name = getlocal.split(",")[1];
         this.name = getlocal.split(",")[1];
-        this.$store.state.query = getlocal.split(",");
       }
       }
       type === "menu" ? (this.home = true) : (this.home = false);
       type === "menu" ? (this.home = true) : (this.home = false);
     },
     },