后端给了个接口 要在前端下载xlsx表
// 导出模板
exportTemplate() {
this.$_Api.Mes.Get({
responseType: "blob",
url: "MesCheckCardItem/downloadExcel",
})
.then(res => {
console.log(res);
})
.catch(err => {
const url = window.URL.createObjectURL(
new Blob([err], { type: "application/vnd.ms-excel;charset=utf-8" })
);
const link = document.createElement("a");
link.href = url;
let fileName = "123" + ".xlsx";
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
});
},
但是下载出来的效果是

版本

应该怎么解决