Merge branch 'new-20250827' of http://47.107.152.87:3000/liubiao/APP into new-20250827

This commit is contained in:
liub
2026-03-19 09:14:51 +08:00
3 changed files with 279 additions and 95 deletions

View File

@ -963,6 +963,21 @@ class BleHelper {
} else {
console.log("蓝牙连接已恢复", res);
// 系统级连接恢复:更新 LinkedList 并通知业务层,避免 sendData 误判未连接而重复 createBLEConnection
let f = this.data.LinkedList.find(v => v.deviceId == res.deviceId);
if (f) {
f.Linked = true;
this.updateCache();
}
if (this.cfg.recoveryCallback.length > 0) {
this.cfg.recoveryCallback.forEach(c => {
try {
c.callback({ deviceId: res.deviceId, connected: true });
} catch (err) {
console.error("执行蓝牙恢复连接的回调异常", err);
}
});
}
}
}, 50);