Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-01-03 10:23:42 +08:00
3 changed files with 17 additions and 13 deletions
+12 -9
View File
@@ -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