let formData = new FormData() //通过formdata上传
console.log("上传文件对象:" + JSON.stringify(info))
formData.append('file', info.file)
formData.append('ocrType', 'HL_product')
formData.append('LegalRepCode', 'BO00001')
console.log('开始文件上传,上传服务:' + apiURL.ApiRootUrlFile)
Http.post(apiURL.ApiRootUrlFile, formData, {
headers: { 'Content-Type': 'multipart/form-data; charset=UTF-8' },
timeout: 1000 * 60 * 2
})
.then(res => {
// this.createMaterialDataResource(res)
this.logoBaseUrl = res.data.fileurlList[0].fileurlList;
this.imageUrl = apiURL.ApiRootUrlFileDownload + res.data.fileurlList[0].fileurlList
console.log("img", this.imageUrl);
this.productInfo.mediumImageUrl = this.logoBaseUrl
})