const requestTask = wx.request({ url: "xxx", method: "get", header: { // 'Content-Type': 'application/x-www-form-urlencoded', }, responseType: 'arraybuffer', enableChunked:true, success: function(res) { console.log("success",res) }, fail: function(res){ console.log("fail",res) }, complete:function(res){ console.log("complete",res); } }); requestTask.onChunkReceived((res) => { let value = new Uint8Array(res.data); console.log(value); }); 执行request,onChunkReceived返回的数据和原始数据不一致,取到的数据大于128的字节全部变成了253 /** * [70, 76, 86, 1, 5, 0, 0, 0, 9, 0, 0, 0, 0, 18, 0, 1, 253, 0, 0, 0, 0, 0, 0, 0, 2, 0, 10, 111, 110, 77, 101, 116, 97, 68, 97, 116, 97, 3, 0, 5, 119, 105, 100, 116, 104, 0, 64, 253, 0, 0, 0, 0, 0, 0, 0, 6, 104, 101, 105, 103, 104, 116, 0, 64, 118, 253, 0, 0, 0, 0, 0, 0, 13, 118, 105, 100, 101, 111, 100, 97, 116, 97, 114, 97, 116, 101, 0, 64, 253, 253, 253, 0, 0, 0, 0, 0, 9, 102, 114, 97, …]
RequestTask.onChunkReceived接受到的数据存在异常溢出原始数据[70, 76, 86, 1, 5, 0, 0, 0, 9, 0, 0, 0, 0, 18, 0, 1, 136, 0, 0, 0, 0, 0, 0, 0, 2, 0, 10, 111, 110, 77, 101, 116, 97, 68, 97, 116, 97, 3, 0, 5, 119, 105, 100, 116, 104, 0, 64, 132, 0, 0, 0, 0, 0, 0, 0, 6, 104, 101, 105, 103, 104, 116, 0, 64, 118, 128, 0, 0, 0, 0, 0, 0, 13, 118, 105, 100, 101, 111, 100, 97, 116, 97, 114, 97, 116, 101, 0, 64, 130, 174, 162, 0, 0, 0, 0, 0, 9, 102, 114, 97] 接收到的数据 [70, 76, 86, 1, 5, 0, 0, 0, 9, 0, 0, 0, 0, 18, 0, 1, 253, 0, 0, 0, 0, 0, 0, 0, 2, 0, 10, 111, 110, 77, 101, 116, 97, 68, 97, 116, 97, 3, 0, 5, 119, 105, 100, 116, 104, 0, 64, 253, 0, 0, 0, 0, 0, 0, 0, 6, 104, 101, 105, 103, 104, 116, 0, 64, 118, 253, 0, 0, 0, 0, 0, 0, 13, 118, 105, 100, 101, 111, 100, 97, 116, 97, 114, 97, 116, 101, 0, 64, 253, 253, 253, 0, 0, 0, 0, 0, 9, 102, 114, 97] 超过128的数据都直接变成253
2023-02-03确实设置arraybuffer为空
worker.request问题?[图片] 采用同样的方式,把wx换成了worker,设置了responseType为”arraybuffer"请求回来的data和wx.request请求回来的data不一样? worker请求的 [图片] wx请求的 [图片]
2023-02-01let iconAd = Laya.Browser.window.wx.createGameIcon({ adUnitId: 'xxxxxx',count:1,style:[{appNameHidden:true,left:x/r,top:y/r,size:20}]}); 文档有错误,这么久了也不改一下
推荐组件的GameIcon接口到底该如何调用有两个问题,第一个是关于创建GameIcon的这个接口wx.createGameIcon,参数列表到底什么意思?这个接口的API文档在这里 https://developers.weixin.qq.com/minigame/dev/api/game-portal/wx.createGameIcon.html 其中写到: [图片] 这里有两个地方可以提供styleItem的,到底该用哪个? 我用我能想到的调用方式一一尝试了一遍,在真机上(iOS平台)测试时总是调用失败,错误信息为: gameSDKScriptError {};wx.createGameIcon Error e@https://res.servicewechat.com/weapp/debug/wx9b3582fe3aff508a/2/:27576:36655 value@https://res.servicewechat.com/weapp/debug/wx9b3582fe3aff508a/2/:27576:32222 https://res.servicewechat.com/weapp/debug/wx9b3582fe3aff508a/2/:27576:16387 https://res.servicewechat.com/weapp/debug/wx9b3582fe3aff508a/2/:27576:19197 forEach@[native code] https://res.servicewechat.com/weapp/debug/wx9b3582fe3aff508a/2/:27576:19087 我的调用代码为: [代码]if[代码] [代码](wx.createGameIcon) {[代码][代码] [代码][代码]let styleItemArray = [...Array(10)].map((_, i) => ({[代码][代码] [代码][代码]appNameHidden: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]color: [代码][代码]'white'[代码][代码],[代码][代码] [代码][代码]size: 150,[代码][代码] [代码][代码]borderWidth: 1,[代码][代码] [代码][代码]borderColor: [代码][代码]'white'[代码][代码],[代码][代码] [代码][代码]left: 100 * i,[代码][代码] [代码][代码]top: 100[代码][代码] [代码][代码]}))[代码] [代码] [代码][代码]try[代码] [代码]{[代码][代码] [代码][代码]this[代码][代码].gameIcon = wx.createGameIcon({[代码][代码] [代码][代码]adUnitId: [代码][代码]'PBgAA3Z_WGRX3-3A'[代码][代码],[代码][代码] [代码][代码]count: 10,[代码][代码] [代码][代码]style: styleItemArray[代码][代码] [代码][代码]}, styleItemArray[0])[代码][代码] [代码][代码]} [代码][代码]catch[代码] [代码](error) {[代码][代码] [代码][代码]console.warn(error)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码] 请各位大神帮忙看看!
2020-07-27[图片]你这算好的,我更新完打开就是300%
微信开发者工具占用CPU过高, 电脑发烫![图片] CPU 占用太高,线程数也好多。有bug吧,上个版本也是这样
2019-08-23