vue下载二进制流图片操作

xxcdxj69970 37 0 PDF 2021-02-01 07:02:38

1、应项目要求,后台返回二进制流,而且乱码 2、红色为必须 this.$axios.post('/fishweb/agent/downLoad',this.stringify({filename:'qrCode.jpg'}), { responseType: 'arraybuffer' //指定返回数据的格式为blob }).then((res) => { var src=[removed]+ btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte)

用户评论
请输入评论内容
评分:
暂无评论