生成小程序码接口返回一串乱码,怎么转换成图片或base64呢?
小程序接口返回的数据是一串乱码,如图所示,怎么转换成base64或者图片呢?目前采取的方法:
请求时设置responseType: “arraybuffer”,拿到了二进制数据流,再使用wx.arrayBufferToBase64(data),转换出来的图片不显示。。。很奇怪,该怎么解决呢?



小程序接口返回的数据是一串乱码,如图所示,怎么转换成base64或者图片呢?目前采取的方法:
请求时设置responseType: “arraybuffer”,拿到了二进制数据流,再使用wx.arrayBufferToBase64(data),转换出来的图片不显示。。。很奇怪,该怎么解决呢?