res就是后端给的文件流
let url = window.URL.createObjectURL(
new Blob([res], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
})
);
console.log('url', url)
})
接口写法
download: () => http.request({
url: `aeroelasticity/file/download/${data.projectId}/${data.type}`,
method: 'post',
data: data.fileLocal,
responseType: "blob"
}),