DownLoadFile () {let param = 'warehousing application form template' enclosing $HTTP. Get ('/entryApplication/downLoadFile? name='+param,{responseType:'blob'}).then(res=>{ //res.data var blob = new Blob([content]); const blob = new Blob([res.data]); // New Blob([res]) returns [objece objece] // New Blob([res]) returns [objece objece] const fileName = 'Export to library application template.xlsx '; / / download the file name if (window. The navigator. MsSaveBlob) {the console. The log (" = = = ") try {window. The navigator. MsSaveBlob (blob, fileName); } catch (e) { console.log(e); } } else { console.log('-----') const elink = document.createElement('a'); elink.download = fileName; elink.style.display = 'none'; elink.href = URL.createObjectURL(blob); document.body.appendChild(elink); elink.click(); URL.revokeObjectURL(elink.href); / / release the URL object document. Body. RemoveChild (elink); }})}Copy the code