在使用@hyoga/uni-socket.io拿到数据时报错:Error: Unknown type: [object ArrayBuffer]
下面是错误信息以及错误截图(该错误只出现在真机及模拟器(模拟器打开调试工具也能正常)上H5端正常)
附上一张正常图片(开启了控制台的调试模式)如要demo私聊提供
summerany
- 发布:2020-06-17 20:21
- 更新:2022-04-11 12:10
- 阅读:1275
Error: Unknown type: [object ArrayBuffer]
分类:uni-app
let data: [object ArrayBuffer]
var dataArrayBuffer = new ArrayBuffer(data.byteLength);
var view = new DataView(data);
var view2 = new DataView(dataArrayBuffer);
for(var i=0;i<data.byteLength;i++){
view2.setInt8(i,view.getInt8(i));
}
if (dataArrayBuffer instanceof ArrayBuffer) {
data = dataArrayBuffer;
}
湖东呀
怎么解决这个问题的???
2021-01-13 11:35