feat: 个人中心手机号和邮箱绑定

This commit is contained in:
ray
2024-08-20 00:12:15 +08:00
parent bf63a20fb1
commit 57e876522e
2 changed files with 38 additions and 12 deletions

View File

@@ -146,9 +146,9 @@ class UserAPI {
}
/** 修改个人中心用户信息 */
static updateProfile(id: number, data: UserProfileForm) {
static updateProfile(data: UserProfileForm) {
return request({
url: `${USER_BASE_URL}/${id}/profile`,
url: `${USER_BASE_URL}/profile`,
method: "put",
data: data,
});
@@ -176,6 +176,24 @@ class UserAPI {
params: { contact: contact, contactType: contactType },
});
}
/** 绑定个人中心用户手机 */
static bindMobile(data: MobileBindingForm) {
return request({
url: `${USER_BASE_URL}/mobile`,
method: "put",
data: data,
});
}
/** 丙丁个人中心用户邮箱 */
static bindEmail(data: EmailBindingForm) {
return request({
url: `${USER_BASE_URL}/email`,
method: "put",
data: data,
});
}
}
export default UserAPI;
@@ -335,17 +353,17 @@ export interface PasswordChangeForm {
confirmPassword?: string;
}
/** 手机绑定表单 */
/** 修改手机表单 */
export interface MobileBindingForm {
/** 手机号 */
/** 手机号 */
mobile?: string;
/** 验证码 */
code?: string;
}
/** 邮箱绑定表单 */
/** 修改邮箱表单 */
export interface EmailBindingForm {
/** 邮箱 */
/** 邮箱 */
email?: string;
/** 验证码 */
code?: string;