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

uat_us
wangxiaoshuang 2024-12-27 14:49:58 +08:00
parent 1286cd1212
commit 328359dfde
1 changed files with 12 additions and 4 deletions

View File

@ -308,6 +308,8 @@ export default {
Img1,
toggleRoleVisible: false,
toggleRoleLoading: false,
LoginState: 0,
}
},
computed: {
@ -383,10 +385,12 @@ export default {
loginIn(Id) {
this.loading = true
this.showCode = false
this.LoginState = 0
if (Id) this.loginForm.UserId = Id
this.$store
.dispatch('user/login', this.loginForm)
.then((res) => {
this.LoginState = res.BasicInfo.LoginState
if (res.BasicInfo.IsFirstAdd) {
// ,
this.$message.success(this.$t('login:message:login1'))
@ -422,11 +426,12 @@ export default {
},
})
return
} else if (res.BasicInfo.LoginState === 2) {
// IP'
// this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
this.$message.warning(this.$t('login:message:login4'))
}
// else if (res.BasicInfo.LoginState === 2) {
// // IP'
// // 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
@ -455,6 +460,9 @@ export default {
if (res && res.length > 0) {
this.$store.dispatch('global/getNoticeList')
this.$router.addRoutes(res)
if (this.LoginState === 2) {
this.$message.warning(this.$t('login:message:login4'))
}
if (this.loginType === 'DevOps') {
this.$router.replace({ path: res[0].path })
return