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