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 => {
...
})
原文地址:https://www.cnblogs.com/shiazhen/p/12187514.html
时间: 2024-10-12 18:02:47