export function downloadAttachApi(resource){
return request({
url: '/common/haihong/download?fileUrl='+resource,
method: 'get',
responseType:'blob'
})
}
handleAttachDownload(row) {
downloadAttachApi(row.fileUrl).then(res=>{
console.log(res)
let blob = new Blob([res], {type: res.type})
const fileName = 'ProductTemplateCopy.zip';
let downloadElement = document.createElement('a')
let href = window.URL.createObjectURL(blob);
downloadElement.href = href;
downloadElement.download = fileName;
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement);
window.URL.revokeObjectURL(href);
})
},