From 823ac2f085a6eb815ecd9c8c09cc5f0948474c7f Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 20 Jan 2025 15:58:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E9=99=86=E9=A1=B5=E9=9D=A2=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index cbd8136e..c31e6d48 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -328,6 +328,7 @@ export default { }, }, mounted() { + let lang = zzSessionStorage.getItem('lang') || 'zh' zzSessionStorage.clear() this.loginType = this.$route.query.loginType this.location = this.$route.query.location @@ -343,8 +344,8 @@ export default { this.setLanguage('en') this.$updateDictionary() } else { - this.$i18n.locale = 'zh' - this.setLanguage('zh') + this.$i18n.locale = lang + this.setLanguage(lang) this.$updateDictionary() } } @@ -388,8 +389,8 @@ export default { .dispatch('user/login', this.loginForm) .then((res) => { if (res.BasicInfo.LoginState === 2) { - this.$message.warning(this.$t('login:message:login4')) - } + this.$message.warning(this.$t('login:message:login4')) + } if (res.BasicInfo.IsFirstAdd) { // 当前用户为首次登录,请先修改密码之后再次登录 this.$message.success(this.$t('login:message:login1'))