Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
2e8095939b
|
@ -134,9 +134,9 @@ export default {
|
||||||
let res = await verifyMFACode(this.form);
|
let res = await verifyMFACode(this.form);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
if (this.status === "login") {
|
// if (this.status === "login") {
|
||||||
this.$message.success(this.$t("mfa:message:verifySuccess"));
|
// this.$message.success(this.$t("mfa:message:verifySuccess"));
|
||||||
}
|
// }
|
||||||
this.$emit("success", this.form.IdentityUserId);
|
this.$emit("success", this.form.IdentityUserId);
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ export default {
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
UserId: this.form.IdentityUserId,
|
// IdentityUserId: this.form.IdentityUserId,
|
||||||
};
|
};
|
||||||
if (this.status === "lock") {
|
if (this.status === "lock") {
|
||||||
data.MfaType = 1;
|
data.MfaType = 1;
|
||||||
|
|
|
@ -85,6 +85,7 @@ router.beforeEach(async (to, from, next) => {
|
||||||
router.addRoutes(accessRoutes)
|
router.addRoutes(accessRoutes)
|
||||||
next({ ...to, replace: true })
|
next({ ...to, replace: true })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
// 删除token并进入登录页面以重新登录
|
// 删除token并进入登录页面以重新登录
|
||||||
await store.dispatch('user/resetToken')
|
await store.dispatch('user/resetToken')
|
||||||
next(`/login?redirect=${to.path}`)
|
next(`/login?redirect=${to.path}`)
|
||||||
|
|
|
@ -420,7 +420,7 @@ export default {
|
||||||
UserId: res.BasicInfo.IdentityUserId,
|
UserId: res.BasicInfo.IdentityUserId,
|
||||||
EMail: res.BasicInfo.EMail,
|
EMail: res.BasicInfo.EMail,
|
||||||
username: this.loginForm.username,
|
username: this.loginForm.username,
|
||||||
callBack: this.loginIn,
|
callBack: this.changeRoleLogin,
|
||||||
cancelBack: () => {
|
cancelBack: () => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
@ -432,14 +432,7 @@ export default {
|
||||||
// // this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
|
// // this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
|
||||||
// this.$message.warning(this.$t('login:message:login4'))
|
// this.$message.warning(this.$t('login:message:login4'))
|
||||||
// }
|
// }
|
||||||
if (
|
this.changeRoleLogin()
|
||||||
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)
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.showCode = true
|
this.showCode = true
|
||||||
|
@ -502,6 +495,16 @@ export default {
|
||||||
this.toggleRoleLoading = false
|
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() {
|
cancel() {
|
||||||
this.showCode = true
|
this.showCode = true
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
Loading…
Reference in New Issue