From a1667dcec2c84728ae7d9ed195cf6653cb2d43fb Mon Sep 17 00:00:00 2001 From: bjang03 <259278618@qq.com> Date: Tue, 27 Aug 2024 15:08:37 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=99=BB=E5=BD=95=E6=97=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E7=A0=81=E8=BF=87=E6=9C=9F=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=EF=BC=8C=E8=BF=87=E6=9C=9F=E5=88=99=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user/index.ts | 4 +++- src/views/login/components/LoginForm.vue | 6 ++++++ src/views/login/updatePasswordNewTips.vue | 6 ++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 926b8068f..29ece2378 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -98,7 +98,9 @@ export const updatePassword = (data : UserVO) => { return request.put({ url: '/system/user/updatePassword', data }) } - +export const getPassWordConfig = () => { + return request.get({ url: '/system/password/getConfig' }) +} // 查询用户详情 export const getUserListByDeptIds = (data : Array) => { return request.post({ url: '/system/user/getUserListByDeptIds', data }) diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index a371cc83a..3af1028c8 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -276,6 +276,12 @@ // 存储 部门信息 const { wsCache } = useCache() wsCache.set(CACHE_KEY.DEPT, await DeptApi.getSimpleDeptList()) + }catch (e) { + if(e.code === 1002000010){ + setTimeout(function (){ + window.location.href = "/updatePasswordNewTips?username="+loginData.loginForm.username + },3000) + } } finally { console.log('登录-224') getCode() diff --git a/src/views/login/updatePasswordNewTips.vue b/src/views/login/updatePasswordNewTips.vue index 1f99bc5c0..cf6709065 100644 --- a/src/views/login/updatePasswordNewTips.vue +++ b/src/views/login/updatePasswordNewTips.vue @@ -23,7 +23,7 @@ -
温馨提示:密码长度通常需要在6-20个字符之间。
+ @@ -54,6 +54,7 @@ password: '', againPassword: '', mailKey: '', + userName: route.query.username, }) const isShowPassword = ref(false) const isShowAgainPassword = ref(false) @@ -66,10 +67,11 @@ message.error('两次输入的密码不一致,请重新输入!') } else { const data = loginData as unknown as UserApi.UserVO + debugger await UserApi.updatePassword(data) // 发送操作成功的事件 message.success(t('common.updateSuccess')) -  router.go(-1) + router.go(-1) } } finally { // formLoading.value = false