|
@@ -214,27 +214,27 @@ export default {
|
|
|
captchaId: this.loginForm.captchaId,
|
|
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
|
|
this.$api.login
|
|
|
.login2(userInfo)
|
|
.login2(userInfo)
|