修改头像裁剪组件,修改其他bug

This commit is contained in:
田岩
2025-09-02 21:18:48 +08:00
parent acae343260
commit e12756b45e
31 changed files with 1268 additions and 1308 deletions
+3 -1
View File
@@ -12,10 +12,11 @@ export const uploadFile = (file, data) => {
const base_url = get_base_url(url);
const token = getToken();
const header = {};
console.log('file', file);
if (token)
header['summary'] = token
return new Promise((resolve, reject) => {
uni.uploadFile({
uni.uploadFile({
url: `${base_url}${url}`,
header: header,
filePath: file,
@@ -34,6 +35,7 @@ export const uploadFile = (file, data) => {
}
},
fail(error) {
console.log('error', error);
reject(new Error('Upload failed'));
}
});