vue请求图片二维码

 
 
axios .get('/captcha', { params: param, responseType: 'arraybuffer' }) .then(response => { return 'data:image/png;base64,' + btoa( new Uint8Array(response.data) .reduce((data, byte) => data + String.fromCharCode(byte), '') ); }).then(data => { ... }) 
 
 

 

 

猜你喜欢

转载自www.cnblogs.com/silences/p/9117327.html