同问题,onBluetoothDeviceFound第一次使用onBluetoothDeviceFound有数据, 第二次启动onBluetoothDeviceFound后onBluetoothDeviceFound无数据,扫描的设备是同一台 getBleList() { wx.offBluetoothDeviceFound() wx.onBluetoothDeviceFound((res) => { res.devices.forEach(item => { this.data.deives.push({ name: item.name, device: item }) }) this.setData({ deives: this.data.deives, showAll: true, isLoad: false }) wx.hideLoading(); }) wx.startBluetoothDevicesDiscovery({ app: this, services: [id], success(res) { console.log(res.errMsg) wx.showLoading({ title: "正在扫描设备", mask: true }); }, fail(res) { console.log(res.errMsg) this.app.setData({ isLoad: false }) this.app.showFail() } }) },
onBluetoothDeviceFound第一次调用能搜到第二次就搜不到?onBluetoothDeviceFound第一次调用能搜到第二次就搜不到
2023-11-23