mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-12-23 20:49:42 +08:00
上传头像优化
This commit is contained in:
@@ -38,7 +38,7 @@ export const UserInfoModel: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
name: "file",
|
name: "file",
|
||||||
multiple: false,
|
multiple: false,
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
action: config.app_url + "/api/v1/user/avatar",
|
action: config.app_url + "api/v1/user/avatar",
|
||||||
headers: {
|
headers: {
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
authorization: "Bearer " + getToken(),
|
authorization: "Bearer " + getToken(),
|
||||||
@@ -63,8 +63,6 @@ export const UserInfoModel: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
}
|
}
|
||||||
} else if (status === "error") {
|
} else if (status === "error") {
|
||||||
message.error(`${info.file.name} 上传失败`);
|
message.error(`${info.file.name} 上传失败`);
|
||||||
} else {
|
|
||||||
message.error("上传失败");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user