refactor: 优化个人中心部分代码

This commit is contained in:
2024-05-09 22:33:14 +08:00
parent c64cf9da34
commit eb11cae635
13 changed files with 197 additions and 234 deletions

View File

@@ -8,7 +8,7 @@ export interface UserInfo {
phone: string
avatar: string
pwdResetTime: string
passwordExpired: boolean
pwdExpired: boolean
registrationDate: string
deptName: string
roles: string[]

View File

@@ -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)
}