@@ -2,11 +2,15 @@
|
||||
import type { ResultFile } from "@/api/result";
|
||||
|
||||
/** 上传文件*/
|
||||
export const uploadFile = (data?: object) => {
|
||||
return http.request<ResultFile>("post", "/file", {
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
data
|
||||
});
|
||||
export const uploadFile = data => {
|
||||
return http.request<ResultFile>(
|
||||
"post",
|
||||
"/file",
|
||||
{ data },
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ export const updateUserProfile = data => {
|
||||
|
||||
/** 只修改用户头像 */
|
||||
export const updateUserIcon = data => {
|
||||
return http.request<Result>("put", `/account/icon`, { data: { icon: data } });
|
||||
return http.request<Result>("put", `/account/icon`, { data });
|
||||
};
|
||||
|
||||
/** 用户密码重置 */
|
||||
|
||||
Reference in New Issue
Block a user