- writeBLECharacteristicValue:fail:operate time out?
[图片] 想分包,但一执行writeBLECharacteristicValue就这样,怎么处理?
2020-10-30 - notifyBLECharacteristicValueChange调用报错?
[图片] {"errCode":10008,"errMsg":"notifyBLECharacteristicValueChange:fail:no descriptor"} 华为Mate20X,微信7.0.19,EMUI10.1.0.166,Android10,基础库2.13.1 getBLEDeviceServices(deviceId) { let that = this wx.getBLEDeviceServices({ deviceId, success: (res) => { for (let i = 0; i < res.services.length; i++) { let serviceId = res.services[i].uuid wx.getBLEDeviceCharacteristics({ deviceId, serviceId, success: (res) => { for (let j = 0; j < res.characteristics.length; j++) { let item = res.characteristics[j] if (item.properties.read) {} if (item.properties.write) {} if (item.properties.notify || item.properties.indicate) { wx.notifyBLECharacteristicValueChange({ deviceId, serviceId, characteristicId: item.uuid, state: true, }) } } }, fail(res) { console.error('getBLEDeviceCharacteristics', res) } }) wx.onBLECharacteristicValueChange((characteristic) => { console.log("characteristicId:" + res.characteristicId) console.log("serviceId:" + res.serviceId) console.log("deviceId" + res.deviceId) console.log("Length:" + res.value.byteLength) // const idx = inArray(this.data.chs, characteristic.characteristicId) // const data = {} // if (idx === -1) { // data[`ser[${this.data.chs.length}]`] = { // uuid: characteristic.characteristicId, // value: ab2hex(characteristic.value) // } // } else { // data[`chs[${idx}]`] = { // uuid: characteristic.characteristicId, // value: ab2hex(characteristic.value) // } // } // this.setData(data) }) } that.setData(services) this.setData({ ser: services }) console.log(services) }, }) }, writeBLECharacteristicValue() { let that = this // let dataView = new DataView(buffer) // dataView.setUint8(0, Math.random() * 255 | 0) console.log(that.data.text) console.log(that.data.ser) wx.writeBLECharacteristicValue({ deviceId: that.data.deviceId, serviceId: "10000000-0000-0000-0000-000000000000", characteristicId: "12000000-0000-0000-0000-000000000000", value: new ArrayBuffer(that.data.text), }) },
2020-10-28 - 间歇性出现is not found的报错,怎么处理?
[图片] 这个error大概十次里会出现三四次,出现的时候等一会儿再重新加载就能通过了,但是时不时会再出现,怎么回事? 用到equipment/equipment的地方也就这些,[图片] equipment是有tabBar的,所以用switchTab应该没问题 [图片]
2020-10-28 - 使用npm安装Lin UI后提示"../list/index" 未找到?
[图片] 提示:[ miniprogram_npm/lin-ui/collapse-item/index.json 文件内容错误] miniprogram_npm/lin-ui/collapse-item/index.json: ["usingComponents"]["l-list"]: "../list/index" 未找到
2020-10-26 - 为什么预览和真机调试的效果这么不一样?
设定在打开小程序时根据腾讯地图获取用户地址,在获取到地址的回调里调用网络接口获取地址对应的天气,在预览里完全获取不到天气,但是在真机调试里可以。预览也没办法靠log输出查看问题在哪里,请问怎么解决?
2020-10-21 - scroll-view怎么做到纵列且一行两个?
[图片]这是scroll-view和内部item的 [图片]这是app.wxss 实在找不出还有什么影响因素了
2020-10-19 - ["usingComponents"]["mpProgress"] 未找到?
路径应该没有错误,“构建npm”也点了好几次,但一直报错 [图片] [图片]
2020-10-16