html52.com
我爱小程序-开发者交流社区

wx.readBLECharacteristicValue 返回参数的问题

问题模块
API和组件

这个接口在官方文档列子中如下:


```

wx.readBLECharacteristicValue({  // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接  [**new**]
  deviceId: deviceId,  // 这里的 serviceId 需要在上面的 getBLEDeviceServices 接口中获取
  serviceId: serviceId,  // 这里的 characteristicId 需要在上面的 getBLEDeviceCharacteristics 接口中获取
  characteristicId: characteristicId,
  success: function (res) {    console.log('readBLECharacteristicValue:', res.characteristic.value)
  }
})

```


但是真正使用时才发现其实`success`回调中没有 `characteristic` 返回值.

这时一大坑,文档需要更新了。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付