lsc há 2 anos atrás
pai
commit
58af49f26a
1 ficheiros alterados com 6 adições e 4 exclusões
  1. 6 4
      src/App.vue

+ 6 - 4
src/App.vue

@@ -78,10 +78,12 @@ export default {
         this.$store.commit("update", ["isLogin", true]);
         // var info = JSON.parse(window.sessionStorage.getItem("userInfo"));
         this.$store.commit("update", ["userInfo", userInfo]);
-        if (userInfo.type == '1') {
-          this.$router.push("/eventCenter?steps=" + "2");
-        } else if (userInfo.type == '2' || userInfo.type == '3' || userInfo.type == '4' || userInfo.type == '5' || userInfo.type == '6') {
-          this.$router.push("/anliList");
+        if (this.$route.path == '/login') {
+          if (userInfo.type == '1') {
+            this.$router.push("/eventCenter?steps=" + "2");
+          } else if (userInfo.type == '2' || userInfo.type == '3' || userInfo.type == '4' || userInfo.type == '5' || userInfo.type == '6') {
+            this.$router.push("/anliList");
+          }
         }
         this.routerP();
       } else {