uni.request({
url: url',
method: 'GET',
data: {},
responseType: "arraybuffer",
success: res => {
let datas = res.data
this.codeImg = 'data:image/png;base64,' + btoa(
new Uint8Array(datas).reduce((datas, byte) => datas + String.fromCharCode(byte), '')
);
},
fail: () => {},
complete: () => {}
});
<image :src="codeImg" mode=""></image>