From 1348d5f864660febece71d0ad60c3f8658e719ae Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Thu, 16 Jan 2025 11:29:01 +0800 Subject: [PATCH] =?UTF-8?q?IP=E4=B8=8D=E4=B8=80=E8=87=B4=E7=99=BB=E9=99=86?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 69a66455..81003a5c 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -308,8 +308,6 @@ export default { Img1, toggleRoleVisible: false, toggleRoleLoading: false, - - LoginState: 0, } }, computed: { @@ -385,12 +383,13 @@ 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.LoginState === 2) { + this.$message.warning(this.$t('login:message:login4')) + } if (res.BasicInfo.IsFirstAdd) { // 当前用户为首次登录,请先修改密码之后再次登录 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 } else if (res.IsMFA) { this.$MFA({ @@ -456,9 +452,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.LoginState === 2) { + // this.$message.warning(this.$t('login:message:login4')) + // } if (this.loginType === 'DevOps') { this.$router.replace({ path: res[0].path }) return