|
|
@ -315,6 +315,7 @@ export default {
|
|
|
|
this.$store
|
|
|
|
this.$store
|
|
|
|
.dispatch("Login", this.loginForm)
|
|
|
|
.dispatch("Login", this.loginForm)
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
console.log(res)
|
|
|
|
if (res.data.needChangePwd == true) {
|
|
|
|
if (res.data.needChangePwd == true) {
|
|
|
|
this.$confirm('系统检测到您的密码长时间未修改,为保证您的账号安全建议立即修改密码?', '提示', {
|
|
|
|
this.$confirm('系统检测到您的密码长时间未修改,为保证您的账号安全建议立即修改密码?', '提示', {
|
|
|
|
confirmButtonText: '立即修改',
|
|
|
|
confirmButtonText: '立即修改',
|
|
|
@ -328,6 +329,9 @@ export default {
|
|
|
|
confirmPassword: "",
|
|
|
|
confirmPassword: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
this.$store.dispatch('LogOut').then(() => {
|
|
|
|
|
|
|
|
location.href = process.env.VUE_APP_CONTEXT_PATH;
|
|
|
|
|
|
|
|
})
|
|
|
|
this.$router
|
|
|
|
this.$router
|
|
|
|
.push({path: this.redirect || "/"})
|
|
|
|
.push({path: this.redirect || "/"})
|
|
|
|
.catch((res) => {
|
|
|
|
.catch((res) => {
|
|
|
@ -343,10 +347,32 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((res) => {
|
|
|
|
.catch((res) => {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
if (res == "密码已过期,请修改密码") {
|
|
|
|
|
|
|
|
this.$confirm('密码已过期请立即修改密码?', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '立即修改',
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
this.passwordFormVisible = true;
|
|
|
|
|
|
|
|
this.passwordFormData = {
|
|
|
|
|
|
|
|
oldPassword: "",
|
|
|
|
|
|
|
|
newPassword: "",
|
|
|
|
|
|
|
|
confirmPassword: "",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
this.$router
|
|
|
|
|
|
|
|
.push({path: this.redirect || "/"})
|
|
|
|
|
|
|
|
.catch((res) => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
this.$message.error(res);
|
|
|
|
this.$message.error(res);
|
|
|
|
if (this.captchaEnabled) {
|
|
|
|
if (this.captchaEnabled) {
|
|
|
|
this.getCode();
|
|
|
|
this.getCode();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|