IP不一致登陆提示
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2025-01-16 11:29:01 +08:00
parent cd34ad7ef7
commit 1348d5f864
1 changed files with 6 additions and 10 deletions

View File

@ -308,8 +308,6 @@ export default {
Img1, Img1,
toggleRoleVisible: false, toggleRoleVisible: false,
toggleRoleLoading: false, toggleRoleLoading: false,
LoginState: 0,
} }
}, },
computed: { computed: {
@ -385,12 +383,13 @@ export default {
loginIn(Id) { loginIn(Id) {
this.loading = true this.loading = true
this.showCode = false this.showCode = false
this.LoginState = 0
if (Id) this.loginForm.UserId = Id if (Id) this.loginForm.UserId = Id
this.$store this.$store
.dispatch('user/login', this.loginForm) .dispatch('user/login', this.loginForm)
.then((res) => { .then((res) => {
this.LoginState = res.BasicInfo.LoginState if (res.BasicInfo.LoginState === 2) {
this.$message.warning(this.$t('login:message:login4'))
}
if (res.BasicInfo.IsFirstAdd) { if (res.BasicInfo.IsFirstAdd) {
// , // ,
this.$message.success(this.$t('login:message:login1')) this.$message.success(this.$t('login:message:login1'))
@ -414,9 +413,6 @@ export default {
}, },
} }
) )
if (res.BasicInfo.LoginState === 2) {
this.$message.warning(this.$t('login:message:login4'))
}
return return
} else if (res.IsMFA) { } else if (res.IsMFA) {
this.$MFA({ this.$MFA({
@ -456,9 +452,9 @@ export default {
if (res && res.length > 0) { if (res && res.length > 0) {
this.$store.dispatch('global/getNoticeList') this.$store.dispatch('global/getNoticeList')
this.$router.addRoutes(res) this.$router.addRoutes(res)
if (this.LoginState === 2) { // if (this.LoginState === 2) {
this.$message.warning(this.$t('login:message:login4')) // this.$message.warning(this.$t('login:message:login4'))
} // }
if (this.loginType === 'DevOps') { if (this.loginType === 'DevOps') {
this.$router.replace({ path: res[0].path }) this.$router.replace({ path: res[0].path })
return return