优化100j
This commit is contained in:
@ -300,7 +300,7 @@
|
||||
},
|
||||
bleStateRecovery() {
|
||||
console.log("蓝牙适配器恢复可用,重连断开的设备");
|
||||
ble.linkAllDevices();
|
||||
if (ble && ble.linkAllDevices) ble.linkAllDevices();
|
||||
|
||||
},
|
||||
bleBreak(res) {
|
||||
@ -327,7 +327,7 @@
|
||||
let f = null;
|
||||
if (ble.data && ble.data.LinkedList) {
|
||||
f = ble.data.LinkedList.find(v => {
|
||||
|
||||
if (!v) return false;
|
||||
if (v.macAddress && v.device && v.device.id) {
|
||||
return v.device.id == this.deviceList[i].id;
|
||||
}
|
||||
@ -749,6 +749,9 @@
|
||||
onLoad() {
|
||||
|
||||
// console.error("首页加载");
|
||||
// 必须先初始化 ble:getTab/downCallback 会触发 updateBleStatu,否则会访问 null
|
||||
ble = bleTool.getBleTool();
|
||||
recei = BleReceive.getBleReceive();
|
||||
this.getTab()
|
||||
this.downCallback();
|
||||
|
||||
@ -763,8 +766,6 @@
|
||||
console.log('列表收到消息了么');
|
||||
this.downCallback();
|
||||
});
|
||||
ble = bleTool.getBleTool();
|
||||
recei = BleReceive.getBleReceive();
|
||||
//蓝牙连接成功的回调
|
||||
ble.addRecoveryCallback((res) => {
|
||||
// console.log("蓝牙连接成功的回调");
|
||||
|
||||
Reference in New Issue
Block a user