diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 3ecc4eab..8a932720 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -121,7 +121,7 @@ const actions = { localStorage.setItem('CompanyInfo', JSON.stringify(response.Result.CompanyInfo)) const data = response.Result commit('SET_ROLES', data.BasicInfo.AccountList) - if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) { + if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1 || data.BasicInfo.IsNeedResetPwd) { try { zzSessionStorage.setItem('userId', data.BasicInfo.Id) commit('SET_TOKEN', data.JWTStr) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 89dbf290..ed041659 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -156,7 +156,7 @@ -

{{ $t('login:title:system') }}

+

{{ $t('login:title:system') }}

V{{ $version.IsEnv_US ? $version.Version_US : $version.Version }} @@ -374,6 +374,15 @@ export default { }) }, 500) return + } else if (res.BasicInfo.IsNeedResetPwd) { + // 当前用户管理员重置密码,请先修改密码之后再次登录 + this.$message.success(this.$t('login:message:login5')) + setTimeout(() => { + this.$router.push({ + path: `/user-recompose?UserId=${res.BasicInfo.IdentityUserId}&Email=${res.BasicInfo.EMail}&UserName=${res.BasicInfo.UserName}&lang=${this.$i18n.locale}&access_token=${res.JWTStr}&isUpdate=1`, + }) + }, 500) + return } else if (res.BasicInfo.NeedChangePassWord) { // 请先修改密码后再登录! this.$alert(