First request the data to set the responseType: 'blob' in the format of the other unchanged
The format returned by the backend is text/xml
and then manipulate data
//数据转换为文件下载
var elink = document.createElement('a')
elink.download = '文件名称.zip'
elink.style.display = 'none'
var blob = new Blob([res.data], { type: 'application/zip' })
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
document.body.removeChild(elink)