上传附件优化
This commit is contained in:
@@ -245,18 +245,12 @@ Page({
|
||||
title: '提交中...'
|
||||
});
|
||||
const { demandId, imageFiles, attachFiles, remark } = this.data;
|
||||
// 只提交服务端地址与文件名,避免提交本地临时路径
|
||||
// 只提交服务端地址,避免提交本地临时路径(后端按英文逗号分隔存储)
|
||||
const params = {
|
||||
demandId,
|
||||
opType: 'deliverGoods',
|
||||
images: imageFiles.map(file => ({
|
||||
url: file.fullUrl || file.url,
|
||||
name: file.name || ''
|
||||
})),
|
||||
files: attachFiles.map(file => ({
|
||||
url: file.fullUrl || file.url,
|
||||
name: file.name
|
||||
})),
|
||||
images: imageFiles.map(file => file.fullUrl || file.url),
|
||||
files: attachFiles.map(file => file.fullUrl || file.url),
|
||||
remark
|
||||
};
|
||||
demandOperate(params).then(
|
||||
|
||||
Reference in New Issue
Block a user