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