// 划重点 封装接口方法时加上responseTape
expoet function down (data) {
return request ({
url: xxx,
method: xxx,
data,
responseType: ‘blob’ // 必须要加上否则会报错
})
}
主要是responseType: ‘blob’
文章转载,用于记录,原文地址 https://blog.csdn.net/miem_yang/article/details/116709626