feat:新增密码过期修改页面逻辑

This commit is contained in:
秋帆
2024-06-15 14:46:04 +08:00
parent 8bc3992214
commit 921d9c63e9
9 changed files with 567 additions and 65 deletions

View File

@@ -146,32 +146,7 @@ const logout = () => {
})
}
const checkPasswordExpired = () => {
if (!userStore.pwdExpiredShow || !userStore.userInfo.pwdExpired) {
return
}
Modal.confirm({
title: '提示',
content: '密码已过期,需要跳转到修改密码页面?',
hideCancel: false,
closable: true,
onBeforeOk: async () => {
try {
await router.push({ path: '/setting/profile' })
return true
} catch (error) {
return false
}
},
onCancel: () => {
// 当前登录会话不再提示
userStore.pwdExpiredShow = false
}
})
}
onMounted(() => {
checkPasswordExpired()
getMessageCount()
})
</script>