From eb11cae635ff4a0661603509cec4e85a462f5a63 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Thu, 9 May 2024 22:33:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/auth/type.ts | 2 +- src/apis/system/user-center.ts | 4 +- .../{password.svg => password-color.svg} | 0 .../components/HeaderRightBar/index.vue | 16 +- src/router/index.ts | 2 +- src/stores/modules/user.ts | 10 +- src/views/setting/components/VerifyModel.vue | 83 ++++++-- .../profile/{LeftBox.vue => BasicInfo.vue} | 0 src/views/setting/profile/PasswordPolicy.vue | 178 ------------------ src/views/setting/profile/Security.vue | 109 +++++++++++ .../profile/{RightBox.vue => Social.vue} | 20 +- src/views/setting/profile/index.vue | 6 +- src/views/setting/type.ts | 1 + 13 files changed, 197 insertions(+), 234 deletions(-) rename src/assets/icons/{password.svg => password-color.svg} (100%) rename src/views/setting/profile/{LeftBox.vue => BasicInfo.vue} (100%) delete mode 100644 src/views/setting/profile/PasswordPolicy.vue create mode 100644 src/views/setting/profile/Security.vue rename src/views/setting/profile/{RightBox.vue => Social.vue} (84%) diff --git a/src/apis/auth/type.ts b/src/apis/auth/type.ts index 29d0879..578010c 100644 --- a/src/apis/auth/type.ts +++ b/src/apis/auth/type.ts @@ -8,7 +8,7 @@ export interface UserInfo { phone: string avatar: string pwdResetTime: string - passwordExpired: boolean + pwdExpired: boolean registrationDate: string deptName: string roles: string[] diff --git a/src/apis/system/user-center.ts b/src/apis/system/user-center.ts index 31f0fab..33bdd8c 100644 --- a/src/apis/system/user-center.ts +++ b/src/apis/system/user-center.ts @@ -19,12 +19,12 @@ export function updateUserPassword(data: { oldPassword: string; newPassword: str } /** @desc 修改手机号 */ -export function updateUserPhone(data: { newPhone: string; captcha: string; currentPassword: string }) { +export function updateUserPhone(data: { phone: string; captcha: string; oldPassword: string }) { return http.patch(`${BASE_URL}/phone`, data) } /** @desc 修改邮箱 */ -export function updateUserEmail(data: { newEmail: string; captcha: string; currentPassword: string }) { +export function updateUserEmail(data: { email: string; captcha: string; oldPassword: string }) { return http.patch(`${BASE_URL}/email`, data) } diff --git a/src/assets/icons/password.svg b/src/assets/icons/password-color.svg similarity index 100% rename from src/assets/icons/password.svg rename to src/assets/icons/password-color.svg diff --git a/src/layout/components/HeaderRightBar/index.vue b/src/layout/components/HeaderRightBar/index.vue index a5ffb1a..f46ed8a 100644 --- a/src/layout/components/HeaderRightBar/index.vue +++ b/src/layout/components/HeaderRightBar/index.vue @@ -51,7 +51,7 @@