|
|
|
@ -53,25 +53,25 @@
|
|
|
|
|
@click="hidePassword"
|
|
|
|
|
></i>
|
|
|
|
|
</el-input>
|
|
|
|
|
<!-- <el-input-->
|
|
|
|
|
<!-- placeholder="密码"-->
|
|
|
|
|
<!-- name="password"-->
|
|
|
|
|
<!-- :type="isShowPwd ? 'text' : 'password'"-->
|
|
|
|
|
<!-- @keyup.enter.native="handleLogin"-->
|
|
|
|
|
<!-- v-model="loginForm.password"-->
|
|
|
|
|
<!-- autocomplete="on"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <i slot="prefix" class="el-input__icon">-->
|
|
|
|
|
<!-- <icon-svg icon-class="pwd"/>-->
|
|
|
|
|
<!-- </i>-->
|
|
|
|
|
<!-- <i-->
|
|
|
|
|
<!-- slot="suffix"-->
|
|
|
|
|
<!-- class="el-input__icon"-->
|
|
|
|
|
<!-- @click="isShowPwd = !isShowPwd"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <icon-svg icon-class="eye"/>-->
|
|
|
|
|
<!-- </i>-->
|
|
|
|
|
<!-- </el-input>-->
|
|
|
|
|
<!-- <el-input-->
|
|
|
|
|
<!-- placeholder="密码"-->
|
|
|
|
|
<!-- name="password"-->
|
|
|
|
|
<!-- :type="isShowPwd ? 'text' : 'password'"-->
|
|
|
|
|
<!-- @keyup.enter.native="handleLogin"-->
|
|
|
|
|
<!-- v-model="loginForm.password"-->
|
|
|
|
|
<!-- autocomplete="on"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <i slot="prefix" class="el-input__icon">-->
|
|
|
|
|
<!-- <icon-svg icon-class="pwd"/>-->
|
|
|
|
|
<!-- </i>-->
|
|
|
|
|
<!-- <i-->
|
|
|
|
|
<!-- slot="suffix"-->
|
|
|
|
|
<!-- class="el-input__icon"-->
|
|
|
|
|
<!-- @click="isShowPwd = !isShowPwd"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <icon-svg icon-class="eye"/>-->
|
|
|
|
|
<!-- </i>-->
|
|
|
|
|
<!-- </el-input>-->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item
|
|
|
|
|
prop="verificationCode"
|
|
|
|
@ -155,8 +155,8 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return {
|
|
|
|
|
password:"",
|
|
|
|
|
pwdCover:"",
|
|
|
|
|
password: "",
|
|
|
|
|
pwdCover: "",
|
|
|
|
|
ruleForm: {
|
|
|
|
|
userName: "",
|
|
|
|
|
pwd: "",
|
|
|
|
@ -315,6 +315,7 @@ export default {
|
|
|
|
|
this.$store
|
|
|
|
|
.dispatch("Login", this.loginForm)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.data.needChangePwd == true) {
|
|
|
|
|
this.$confirm('系统检测到您的密码长时间未修改,为保证您的账号安全建议立即修改密码?', '提示', {
|
|
|
|
|
confirmButtonText: '立即修改',
|
|
|
|
@ -328,6 +329,9 @@ export default {
|
|
|
|
|
confirmPassword: "",
|
|
|
|
|
};
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$store.dispatch('LogOut').then(() => {
|
|
|
|
|
location.href = process.env.VUE_APP_CONTEXT_PATH;
|
|
|
|
|
})
|
|
|
|
|
this.$router
|
|
|
|
|
.push({path: this.redirect || "/"})
|
|
|
|
|
.catch((res) => {
|
|
|
|
@ -343,10 +347,32 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch((res) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(res);
|
|
|
|
|
if (this.captchaEnabled) {
|
|
|
|
|
this.getCode();
|
|
|
|
|
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);
|
|
|
|
|
if (this.captchaEnabled) {
|
|
|
|
|
this.getCode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|