fix: 🐛 适配文件上传接口调整

This commit is contained in:
Ray.Hao
2025-02-02 23:39:23 +08:00
parent 3b7c026716
commit 4b3f2fb51a
4 changed files with 19 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ const handleToFile = async () => {
const file = dataURLtoFile(canvas.value.toDataURL(), "签名.png");
if (!file) return;
const data = await FileAPI.upload(file);
const data = await FileAPI.uploadFile(file);
handleClearSign();
imgUrl.value = data.url;
};

View File

@@ -458,7 +458,7 @@ const handleFileChange = async (event: Event) => {
if (file) {
// 调用文件上传API
try {
const data = await FileAPI.upload(file);
const data = await FileAPI.uploadFile(file);
// 更新用户头像
userProfile.value.avatar = data.url;
// 更新用户信息