有的时候,我们经常能收到后端的这种数据格式。 let image = "data:image/png;base64," + btoa(new Uint8Array(data.data.img.data).reduce((res, byte) => res + String.fromCharCode(byte), '')) console.log(image); 我们只需要将哪个Buffer数字放进来就行了 成功转成二进制图片