From c29f5e2c04faa9388fdbf9318acfb7e2efdc0476 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Mon, 23 Mar 2026 11:43:40 +0800
Subject: [PATCH] 优化页签显示
---
ruoyi-ui/src/store/modules/user.js | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js
index b1b2d62..18ccf1c 100644
--- a/ruoyi-ui/src/store/modules/user.js
+++ b/ruoyi-ui/src/store/modules/user.js
@@ -1,3 +1,4 @@
+import store from '@/store'
import router from '@/router'
import { MessageBox, } from 'element-ui'
import { login, logout, getInfo, refreshToken } from '@/api/login'
@@ -57,6 +58,7 @@
commit('SET_TOKEN', data.access_token)
setExpiresIn(data.expires_in)
commit('SET_EXPIRES_IN', data.expires_in)
+ store.dispatch('lock/unlockScreen')
resolve()
}).catch(error => {
reject(error)
@@ -86,6 +88,12 @@
router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } })
}).catch(() => {})
}
+ /* 过期密码提示 */
+ if(!res.isDefaultModifyPwd && res.isPasswordExpired) {
+ MessageBox.confirm('您的密码已过期,请尽快修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
+ router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } })
+ }).catch(() => {})
+ }
resolve(res)
}).catch(error => {
reject(error)
--
Gitblit v1.9.3