Commit aad7cc0a authored by youjie's avatar youjie

文件压缩上传

parent 9d8f23eb
...@@ -36,27 +36,27 @@ export default { ...@@ -36,27 +36,27 @@ export default {
uni.showLoading({ uni.showLoading({
title: "上传中", title: "上传中",
}); });
that.upFile(res.tempFilePaths[0], (uploadRes) => { uni.getImageInfo({
let BusinessLicense = JSON.parse( src: res.tempFilePaths[0],
uploadRes.data success: function(image) {
); that.upFile(image.path, (uploadRes) => {
let infor = { let BusinessLicense = JSON.parse(
url: '', uploadRes.data
name: '' );
let infor = {
url: '',
name: ''
}
const tempFilePath = BusinessLicense.FileName;
infor.name = tempFilePath;
infor.url = that.hostErpFile+BusinessLicense.FilePath
that.$emit('onSuccess', infor);
},err=>{
uni.hideLoading()
});
console.log("res.tempFilePaths[0]",res.tempFilePaths[0]);
} }
// console.log('图片名称:',BusinessLicense);
const tempFilePath = BusinessLicense.FileName;
infor.name = tempFilePath;
infor.url = that.hostErpFile+BusinessLicense.FilePath
that.$emit('onSuccess', infor);
// console.log("infor", infor);
},err=>{
uni.hideLoading()
}); });
console.log("res.tempFilePaths[0]",res.tempFilePaths[0]);
}, },
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment