MFA验证登录逻辑修改
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
5328217853
commit
6e66b77857
|
@ -134,9 +134,9 @@ export default {
|
|||
let res = await verifyMFACode(this.form);
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
if (this.status === "login") {
|
||||
this.$message.success(this.$t("mfa:message:verifySuccess"));
|
||||
}
|
||||
// if (this.status === "login") {
|
||||
// this.$message.success(this.$t("mfa:message:verifySuccess"));
|
||||
// }
|
||||
this.$emit("success", this.form.IdentityUserId);
|
||||
this.cancel();
|
||||
}
|
||||
|
@ -153,9 +153,9 @@ export default {
|
|||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
let data = {
|
||||
UserId: this.form.IdentityUserId,
|
||||
};
|
||||
// let data = {
|
||||
// IdentityUserId: this.form.IdentityUserId,
|
||||
// };
|
||||
if (this.status === "lock") {
|
||||
data.MfaType = 1;
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ export default {
|
|||
UserId: res.BasicInfo.IdentityUserId,
|
||||
EMail: res.BasicInfo.EMail,
|
||||
username: this.loginForm.username,
|
||||
callBack: this.loginIn,
|
||||
callBack: this.changeRoleLogin,
|
||||
cancelBack: () => {
|
||||
this.loading = false
|
||||
},
|
||||
|
@ -432,14 +432,7 @@ export default {
|
|||
// // this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
|
||||
// this.$message.warning(this.$t('login:message:login4'))
|
||||
// }
|
||||
if (
|
||||
Array.isArray(this.$store.state.user.roles) &&
|
||||
this.$store.state.user.roles.length === 1
|
||||
) {
|
||||
this.loginByRole(this.$store.state.user.roles[0].Id)
|
||||
return
|
||||
}
|
||||
return (this.toggleRoleVisible = true)
|
||||
this.changeRoleLogin()
|
||||
})
|
||||
.catch(() => {
|
||||
this.showCode = true
|
||||
|
@ -502,6 +495,16 @@ export default {
|
|||
this.toggleRoleLoading = false
|
||||
})
|
||||
},
|
||||
changeRoleLogin() {
|
||||
if (
|
||||
Array.isArray(this.$store.state.user.roles) &&
|
||||
this.$store.state.user.roles.length === 1
|
||||
) {
|
||||
this.loginByRole(this.$store.state.user.roles[0].Id)
|
||||
return
|
||||
}
|
||||
return (this.toggleRoleVisible = true)
|
||||
},
|
||||
cancel() {
|
||||
this.showCode = true
|
||||
this.loading = false
|
||||
|
|
Loading…
Reference in New Issue