优化100j

This commit is contained in:
微微一笑
2026-03-26 19:20:52 +08:00
parent e7b40dbed6
commit b99ac04c88
8 changed files with 745 additions and 120 deletions

View File

@ -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("首页加载");
// 必须先初始化 blegetTab/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("蓝牙连接成功的回调");