diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index 578cd990c..7efa0705c 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -258,18 +258,15 @@ } console.log('登陆res',res) - try{ - await PassWordApi.validateResetTime(res.userId) - }catch (e) { - if (e.code === 1002000010) { - await ElMessageBox.alert( - '密码长时间未修改,存在安全隐患,请及时修改', - '重要提示', - { - dangerouslyUseHTMLString: true, - } - ) - } + const msg = await PassWordApi.validateResetTime(res.userId) + if(msg){ + await ElMessageBox.alert( + ''+msg+'', + '重要提示', + { + dangerouslyUseHTMLString: true, + } + ) } if (!res) { console.log('登录-195')