From 48569345aa99beb9ef24aee584843128f4da3acc Mon Sep 17 00:00:00 2001 From: xuziqiang <1344691446@qq.com> Date: Tue, 16 Jul 2024 14:31:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=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 --- hx-ai-intelligent/src/config/app.config.ts | 2 +- hx-op/src/config/app.config.ts | 4 ++-- lib/saas/view/service/updatePassWord.vue | 26 ++++++++++++-------------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/hx-ai-intelligent/src/config/app.config.ts b/hx-ai-intelligent/src/config/app.config.ts index 9f2881a..11df6ca 100644 --- a/hx-ai-intelligent/src/config/app.config.ts +++ b/hx-ai-intelligent/src/config/app.config.ts @@ -103,7 +103,7 @@ export const appConfig = { updatePassWordInfo: { title: '修改密码', subtitle: 'huaxing平台', - api: '/carbon-smart/api/user/password', + api: '/carbon-smart/api/user/update/password', }, // headerBellInfo: { // isShow: true, diff --git a/hx-op/src/config/app.config.ts b/hx-op/src/config/app.config.ts index b5bd1b2..4dff0a0 100644 --- a/hx-op/src/config/app.config.ts +++ b/hx-op/src/config/app.config.ts @@ -89,8 +89,8 @@ export const appConfig = { // 修改密码配置 updatePassWordInfo: { title: '修改密码', - subtitle: 'huaxing平台', - api: '/api/web/objs/User/changePassword', + subtitle: 'huaxing管理平台', + api: '/carbon-smart/api/user/update/password', }, // headerBellInfo: { // isShow: true, diff --git a/lib/saas/view/service/updatePassWord.vue b/lib/saas/view/service/updatePassWord.vue index e75810f..6743c02 100644 --- a/lib/saas/view/service/updatePassWord.vue +++ b/lib/saas/view/service/updatePassWord.vue @@ -19,7 +19,7 @@
@@ -32,8 +32,6 @@
- 登录已有豪恩账号 > - @@ -69,7 +67,7 @@ const { navigateBackV2: navigateBack } = useNavigate(); const formSchema = reactive([ { - field: 'oldPassword', + field: 'originPassword', label: '原密码', component: 'NsInputPassword', componentProps: { @@ -86,7 +84,7 @@ }, { - field: 'newPassword', + field: 'password', label: '新密码', component: 'NsInputPassword', componentProps: { @@ -147,7 +145,7 @@ if (!value) { return; } - if (value !== data.newPassword) { + if (value !== data.password) { return Promise.reject('两次密码不一致'); } }, @@ -166,14 +164,14 @@ async function update() { try { const res = await http.post(configStore.updatePassWordInfo?.api, data); - if (res.success) { - NsMessage.success('修改成功,需重新登陆', 1, () => { - Cookies.remove(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`); - sessionStorage.clear(); - router.push('/login'); - authorizationStore.clearAuthorization(); - }); - } + // if (res.success) { + NsMessage.success('修改成功,需重新登陆', 1, () => { + Cookies.remove(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`); + sessionStorage.clear(); + router.replace('/login'); + authorizationStore.clearAuthorization(); + }); + // } loading.value = false; } catch (err) { loading.value = false;