|
@@ -780,10 +780,14 @@ const upLoadFile = (signature, image) => {
|
|
|
file: image.file
|
|
|
};
|
|
|
return new Promise((resolve, reject) => {
|
|
|
+ let name = image.name
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ name = 'file'
|
|
|
+ // #endif
|
|
|
const uploadTask = uni.uploadFile({
|
|
|
url: signature.host, // 你的上传接口地址
|
|
|
filePath: image.path,
|
|
|
- name: image.name, // 这里根据后端需要的字段来定义
|
|
|
+ name: name, // 这里根据后端需要的字段来定义
|
|
|
formData: fileData,
|
|
|
success: (uploadFileRes) => {
|
|
|
if (uploadFileRes.statusCode === 204 || uploadFileRes.statusCode === 200) {
|