1.请求类型描述
需要注意的是.需要在后面补上设置,设置请求数据类型 responseType: ‘arraybuffer’

2.重点代码
this.codeImg = ‘data:image/png;base64,’ + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ‘’))
图片

需要注意的是.需要在后面补上设置,设置请求数据类型 responseType: ‘arraybuffer’

this.codeImg = ‘data:image/png;base64,’ + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ‘’))

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。