客户超额消息通知
This commit is contained in:
@@ -58,17 +58,22 @@ const useUserStore = defineStore(
|
||||
this.nickName = user.nickName
|
||||
this.avatar = avatar
|
||||
cache.session.set('pwrChrtype', res.pwdChrtype)
|
||||
/* 改密提示展示标记:通知弹屏组件读取该标记,等改密框关闭后再弹通知,避免双框冲突 */
|
||||
const showPwdPrompt = (msg) => {
|
||||
sessionStorage.setItem('bmsPwdPrompt', '1')
|
||||
ElMessageBox.confirm(msg, '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } })
|
||||
}).catch(() => {}).finally(() => {
|
||||
sessionStorage.removeItem('bmsPwdPrompt')
|
||||
})
|
||||
}
|
||||
/* 初始密码提示 */
|
||||
if(res.isDefaultModifyPwd) {
|
||||
ElMessageBox.confirm('您的密码还是初始密码,请修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } })
|
||||
}).catch(() => {})
|
||||
showPwdPrompt('您的密码还是初始密码,请修改密码!')
|
||||
}
|
||||
/* 过期密码提示 */
|
||||
if(!res.isDefaultModifyPwd && res.isPasswordExpired) {
|
||||
ElMessageBox.confirm('您的密码已过期,请尽快修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } })
|
||||
}).catch(() => {})
|
||||
showPwdPrompt('您的密码已过期,请尽快修改密码!')
|
||||
}
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user