- 为什么一个版本体验版本程序正常,发布后就不能正常了?发布版本一直提示 ”请检查手机蓝牙是否打开“
initble: function () { { // if (wx.openBluetoothAdapter) { wx.openBluetoothAdapter({ success: function (res) { wx.getConnectedBluetoothDevices({ services: [that.data.serviceid], success: function (res) { let findcon = false; if(debug) { console.log("获取处于连接状态的设备", res); } var devices = res['devices']; for (let i = 0; i < devices.length; i++) { if(debug) { console.log("获取处于连接状态的设备1", devices[i]); console.log("获取处于连接状态的设备2", that.data.deviceName); } if(devices[i].name ===that.data.deviceName) { if(debug) { console.log("获取处于连接状态的设备3", that.data.deviceName); } findcon = true; break; } } if(findcon) { if(debug) { console.log("获取处于连接状态的设备4", that.data.deviceName); } that.SendCmd(); } else { wx.showToast({ title: '寻找设备:'+that.data.deviceName , }); that.getBluetoothAdapterState(); } },fail: function (err) { /*没有理解的设备,获取本机的蓝牙状态 */ that.getBluetoothAdapterState() } }); }, fail: function (err) { wx.showModal({ title: '提示', content: '请检查手机蓝牙是否打开'+err, }) } }) // } else { // that.getBluetoothAdapterState() // } }
2023-07-21 - 没有wss 描述,例子的界面显示错误
https://developers.weixin.qq.com/miniprogram/dev/component/icon.html
2023-07-21