修复个人中心问题
This commit is contained in:
1 parent
0dc5c2f075
commit
ca4220f92c
44 files changed
+1793
-310
No files matched your search
@@ -63,6 +63,18 @@ export function bindEmail(userId, email) {
|
||||
return editUser(userId, { email });
|
||||
}
|
||||
|
||||
// 上传并设置当前登录用户头像(一步到位:上传文件 + 写入认证中心头像)
|
||||
// formData 需包含 file 字段;返回 data.url 为头像地址
|
||||
export function uploadAvatar(formData) {
|
||||
return request({
|
||||
url: '/backend/uploadavatar',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
// 上传不设超时;不要手写 Content-Type,需浏览器生成 multipart boundary
|
||||
timeout: 0,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除用户
|
||||
export function deleteUser(userId) {
|
||||
return request({
|
||||
|
||||
Reference in new issue
Block a user