This commit is contained in:
2024-10-08 10:54:50 +08:00
43 changed files with 1380 additions and 2512 deletions

View File

@@ -207,13 +207,16 @@ function upload(uri, data, file, showLoading = true, extParams = {}) {
url: baseUrl + uri,
formData: data,
name: "file",
filePath: file.path,
filePath: file.path||file.url,
header: getHeader()
}, extParams)
).then((httpData) => {
// uni.upload 返回bodyData 的是 string类型。 需要解析。
httpData.data = JSON.parse(httpData.data)
return Promise.resolve(httpData)
}).catch(err=>{
uni.hideLoading()
infoBox.showErrorToast(`上传失败`)
})
})
}