fix: 密码过期情况下,标记用户选择是否修改密码

This commit is contained in:
kils
2024-05-09 18:05:53 +08:00
committed by Charles7c
parent 395a5642af
commit c64cf9da34
3 changed files with 30 additions and 22 deletions

View File

@@ -94,7 +94,6 @@ const handleLogin = async () => {
const { rememberMe } = loginConfig.value
loginConfig.value.username = rememberMe ? form.username : ''
Message.success('欢迎使用')
checkPasswordExpired()
} catch (error) {
getCaptcha()
form.captcha = ''
@@ -103,26 +102,6 @@ const handleLogin = async () => {
}
}
const checkPasswordExpired = () => {
if (!userStore.userInfo.passwordExpired) {
return
}
Modal.confirm({
title: '提示',
content: '密码已过期,是否去修改?',
hideCancel: false,
closable: true,
onBeforeOk: async () => {
try {
await router.push({ path: '/setting/profile' })
return true
} catch (error) {
return false
}
}
})
}
const captchaImgBase64 = ref()
// 获取验证码
const getCaptcha = () => {