上传头像优化

This commit is contained in:
禺狨 2023-04-07 16:48:06 +08:00
parent 9b93235ce8
commit 7af9f1e761

View File

@ -38,7 +38,7 @@ export const UserInfoModel: React.FC<PropInterface> = ({ open, onCancel }) => {
name: "file",
multiple: false,
method: "PUT",
action: config.app_url + "/api/v1/user/avatar",
action: config.app_url + "api/v1/user/avatar",
headers: {
Accept: "application/json",
authorization: "Bearer " + getToken(),
@ -63,8 +63,6 @@ export const UserInfoModel: React.FC<PropInterface> = ({ open, onCancel }) => {
}
} else if (status === "error") {
message.error(`${info.file.name} 上传失败`);
} else {
message.error("上传失败");
}
},
};