From 70fe375e2556f8feda0f2982585ca8e115991ab6 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Tue, 3 Sep 2024 17:12:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=20?= =?UTF-8?q?-=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 --- apps/web-antd/src/api/system/profile/index.ts | 8 +- .../src/api/system/profile/model.d.ts | 5 + .../profile/components/secure-setting.vue | 108 +++++++++++++++++- 3 files changed, 116 insertions(+), 5 deletions(-) diff --git a/apps/web-antd/src/api/system/profile/index.ts b/apps/web-antd/src/api/system/profile/index.ts index c1ccc94b..503067a5 100644 --- a/apps/web-antd/src/api/system/profile/index.ts +++ b/apps/web-antd/src/api/system/profile/index.ts @@ -1,4 +1,4 @@ -import type { UserProfile } from './model'; +import type { UpdatePasswordParam, UserProfile } from './model'; import { requestClient } from '#/api/request'; @@ -30,6 +30,8 @@ export function userProfileUpdate(data: any) { * @param data * @returns void */ -export function userUpdatePassword(data: any) { - return requestClient.put(Api.updatePassword, data, { encrypt: true }); +export function userUpdatePassword(data: UpdatePasswordParam) { + return requestClient.putWithMsg(Api.updatePassword, data, { + encrypt: true, + }); } diff --git a/apps/web-antd/src/api/system/profile/model.d.ts b/apps/web-antd/src/api/system/profile/model.d.ts index 28079bbe..5d01ffab 100644 --- a/apps/web-antd/src/api/system/profile/model.d.ts +++ b/apps/web-antd/src/api/system/profile/model.d.ts @@ -62,3 +62,8 @@ export interface UserProfile { roleGroup: string; postGroup: string; } + +export interface UpdatePasswordParam { + oldPassword: string; + newPassword: string; +} diff --git a/apps/web-antd/src/views/_core/profile/components/secure-setting.vue b/apps/web-antd/src/views/_core/profile/components/secure-setting.vue index af0e1bdd..2d5458c8 100644 --- a/apps/web-antd/src/views/_core/profile/components/secure-setting.vue +++ b/apps/web-antd/src/views/_core/profile/components/secure-setting.vue @@ -1,5 +1,109 @@ - +