feat: 添加解绑手机号和邮箱功能,更新用户资料页面以支持安全设置

This commit is contained in:
Ray.Hao
2026-01-14 11:03:43 +08:00
parent a24bb92ba8
commit e5ec780a44
5 changed files with 234 additions and 86 deletions

View File

@@ -7,6 +7,7 @@ import type {
UserProfileDetail,
UserProfileForm,
PasswordChangeForm,
PasswordVerifyForm,
MobileUpdateForm,
EmailUpdateForm,
OptionItem,
@@ -193,6 +194,15 @@ const UserAPI = {
});
},
/** 解绑手机号 */
unbindMobile(data: PasswordVerifyForm) {
return request({
url: `${USER_BASE_URL}/mobile`,
method: "delete",
data,
});
},
/** 发送邮箱验证码(绑定或更换邮箱)*/
sendEmailCode(email: string) {
return request({
@@ -211,6 +221,15 @@ const UserAPI = {
});
},
/** 解绑邮箱 */
unbindEmail(data: PasswordVerifyForm) {
return request({
url: `${USER_BASE_URL}/email`,
method: "delete",
data,
});
},
/**
* 获取用户下拉列表
*/