通过半地址去下载
async downloadFile (url, name) {
let response = await fetch(url)
// 内容转变成blob地址
let blob = await response.blob()
// 创建隐藏的可下载链接
let objectUrl = window.URL.createObjectURL(blob)
let a = document.createElement('a')
a.style.display = "none";
//地址
a.href = objectUrl
//修改文件名
a.download = name
// 触发点击
document.body.appendChild(a)
a.click()
//移除
URL.revokeObjectURL(a.href);
},