From c780b755533af27af7cb1ec6675c5de98ccf6f58 Mon Sep 17 00:00:00 2001 From: bjang03 <259278618@qq.com> Date: Wed, 11 Sep 2024 15:38:26 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=AF=86=E7=A0=81=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9B=B4=E6=96=B0=E9=A2=84=E8=AD=A6=E6=9C=9F?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E6=88=B7=E5=A2=9E=E5=8A=A0=E5=86=BB=E7=BB=93?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user/index.ts | 5 ++- src/locales/zh-CN.ts | 1 + src/views/login/components/LoginForm.vue | 39 ++++++++++++++++++------ src/views/system/passwordRule/index.vue | 16 ++++++++-- src/views/system/user/index.vue | 19 ++++++++++-- 5 files changed, 65 insertions(+), 15 deletions(-) diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 29ece2378..ba8802e36 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -54,7 +54,10 @@ export const updateUser = (data : UserVO) => { export const deleteUser = (id : number) => { return request.delete({ url: '/system/user/delete?id=' + id }) } - +// 解冻用户 +export const unLockUser = (id : number) => { + return request.get({ url: '/system/user/unLockUser?id=' + id }) +} // 导出用户 export const exportUser = (params) => { return request.download({ url: '/system/user/export', params }) diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index afbdb754a..1e78e1525 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -53,6 +53,7 @@ export default { status: '状态', createTime: '创建时间', updateTime: '更新时间', + unLockSuccess: '解冻成功', copy: '复制', copySuccess: '复制成功', copyError: '复制失败', diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index 7efa0705c..0fe8506d1 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -258,15 +258,36 @@ } console.log('登陆res',res) - const msg = await PassWordApi.validateResetTime(res.userId) - if(msg){ - await ElMessageBox.alert( - ''+msg+'', - '重要提示', - { - dangerouslyUseHTMLString: true, - } - ) + const differenceDays = await PassWordApi.validateResetTime(res.userId) + switch (differenceDays){ + case -1: + await ElMessageBox.alert( + '密码即将到期,请尽快修改。', + '重要提示', + { + dangerouslyUseHTMLString: true, + } + ) + break + case 0: + await ElMessageBox.alert( + '密码到期,请立即修改', + '重要提示', + { + dangerouslyUseHTMLString: true, + } + ) + router.push({path:"/updatePasswordNewTips",query:{username:loginData.loginForm.username}}) + return + case 1: + await ElMessageBox.alert( + '密码过期账号已冻结,请联系管理员解冻', + '重要提示', + { + dangerouslyUseHTMLString: true, + } + ) + return } if (!res) { console.log('登录-195') diff --git a/src/views/system/passwordRule/index.vue b/src/views/system/passwordRule/index.vue index d5f964e88..85483aec9 100644 --- a/src/views/system/passwordRule/index.vue +++ b/src/views/system/passwordRule/index.vue @@ -1,13 +1,18 @@ - +