uni-app 图片接收图片流

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: () => {}
					});

 

你可能感兴趣的:(uni-app)