代码如下:



解决办法:在调用后端接口的时候增加两个参数:
responseType: 'blob',headers:{ 'Content-Type': 'application/json; application/octet-stream'},

完美解决:

代码如下:
解决办法:在调用后端接口的时候增加两个参数:
responseType: 'blob',headers:{ 'Content-Type': 'application/json; application/octet-stream'},
完美解决:
本文标题:vue使用axios下载zip,打开提示文件损坏
本文链接:https://www.haomeiwen.com/subject/hcednctx.html
网友评论