uni.compressImage({
src: tempFilePaths[0],
quality: 60,
success: res => {
uni.uploadFile({
url: env.BASEURL + '/sys/file/upload',
filePath: res.tempFilePath,
formData: {tableName:that.tableName, filePath: that.tableName,fieldType:that.fieldType},
name: 'file',
success: (uploadFileRes) => {
let res = JSON.parse(uploadFileRes.data);
if (res && res.code == 0) {
//回显给附件
} else {
//上传接口调用失败处理提醒
}
}
});
that.showChooseFile = true;
}
})