yaoyao преди 2 години
родител
ревизия
50b4751aee
променени са 1 файла, в които са добавени 21 реда и са изтрити 21 реда
  1. 21 21
      src/views/Login.vue

+ 21 - 21
src/views/Login.vue

@@ -214,27 +214,27 @@ export default {
             captchaId: this.loginForm.captchaId,
           };
 
-          this.$store
-            .dispatch("login", userInfo)
-            .then(() => {
-              if (this.rememberPassword) {
-                //是否保存密码
-                Cookies.set("accountInfo", {
-                  account: this.loginForm.account,
-                  password: this.loginForm.password,
-                });
-              } else {
-                Cookies.remove("accountInfo");
-              }
-              Cookies.set("user", userInfo.account) /
-                sessionStorage.setItem("user", userInfo.account); // 保存用户到本地会话
-              this.$store.commit("menuRouteLoaded", false); // 要求重新加载导航菜单
-              this.$router.push("/");
-              this.loading = false;
-            })
-            .catch(() => {
-              this.loading = false;
-            });
+          // this.$store
+          //   .dispatch("login", userInfo)
+          //   .then(() => {
+          //     if (this.rememberPassword) {
+          //       //是否保存密码
+          //       Cookies.set("accountInfo", {
+          //         account: this.loginForm.account,
+          //         password: this.loginForm.password,
+          //       });
+          //     } else {
+          //       Cookies.remove("accountInfo");
+          //     }
+          //     Cookies.set("user", userInfo.account) /
+          //       sessionStorage.setItem("user", userInfo.account); // 保存用户到本地会话
+          //     this.$store.commit("menuRouteLoaded", false); // 要求重新加载导航菜单
+          //     this.$router.push("/");
+          //     this.loading = false;
+          //   })
+          //   .catch(() => {
+          //     this.loading = false;
+          //   });
 
           this.$api.login
             .login2(userInfo)