xiaodai2017 2 سال پیش
والد
کامیت
6b72dbbb99
1فایلهای تغییر یافته به همراه12 افزوده شده و 9 حذف شده
  1. 12 9
      src/views/login/index.vue

+ 12 - 9
src/views/login/index.vue

@@ -241,15 +241,18 @@ export default {
       this.$store
         .dispatch("user/getMenuList", this)
         .then((res) => {
-          console.log(res);
-          window.vm.$router.push({
-            path: this.redirect
-              ? this.redirect
-              : res === "success-dataV"
-              ? "/bigScreen/datavScr"
-              : "/welcome",
-            query: this.otherQuery,
-          });
+          if (res === "success") {
+            console.log(res);
+            window.vm.$router.push({
+              path: this.redirect
+                ? this.redirect
+                : res === "success-dataV"
+                ? "/bigScreen/datavScr"
+                : "/welcome",
+              query: this.otherQuery,
+            });
+          }
+
           this.loading = false;
         })
         .catch((err) => {