feat(settings): 个人信息手机号/邮箱开放自助修改——保存按钮启用走 /api/user/UpdateContact(前端校验与后端同口径:手机号 1[3-9] 段位/邮箱格式/长度),成功以接口返回的最新 BoaUser 合并 store.userInfo 即时回显(规避 CAS principal 缓存旧值);BaseApi 新增 updateContact(任务B·前端)

This commit is contained in:
chenxing
2026-10-02 08:56:46 +08:00
parent f52ce4136e
commit 1d34e5745d
2 changed files with 54 additions and 4 deletions
+9
View File
@@ -14,6 +14,15 @@ class Base extends Abstract {
return this.getRequest({ url, isMsg: false });
}
/**
* 修改本人联系方式(手机号/邮箱,至少一项非空;后端经 UserBase 开放接口落库)。
* 成功返回更新后的最新用户信息(BoaUser,含新 phone/email),供调用方刷新 store 规避 CAS principal 旧值。
*/
updateContact(phone: string, email: string) {
const url = path + "/user/UpdateContact";
return this.postRequest<any>({ url, data: { phone, email } });
}
/**
*获取用户全部角色
* @memberof Basic