1
0
forked from dyf/APP

完成102添加联机日志,报警日志

This commit is contained in:
liub
2026-01-28 16:31:34 +08:00
parent 1b48751944
commit d6ca84170f
16 changed files with 2651 additions and 805 deletions

View File

@ -780,7 +780,6 @@ class BleHelper {
if (this.cfg.receivDataCallback.length > 0) {
let path = this.getCurrentPagePath();
// console.log("有人订阅消息")
this.cfg.receivDataCallback.forEach((
rec) => {
@ -789,7 +788,7 @@ class BleHelper {
try {
// console.log("正在处理订阅消息",rec);
rec.callback(recData, f,
path, this.cfg
rec.key, this.cfg
.receivDataCallback
);
// console.log("处理订阅消息完毕");
@ -1601,12 +1600,23 @@ class BleHelper {
timeout: 30000,
success: (info) => {
//释放连接锁
delete this.data.connectingDevices[deviceId];
console.log("新连接成功", this.data.LinkedList);
// 处理 MTU 设置
if (plus.os.name === 'Android') {
this.setMtu(deviceId).catch(ex => {
console.error("mtu设置失败=", ex);
});
}
this.getLinkBlue().then((arr) => {
let linkId=new Date().getTime();//本次连接的id
let cr = arr.devices.find(c => {
if (c.deviceId == deviceId) {
c.Linked = true;
c.linkId=linkId
return true;
}
return false;
@ -1614,6 +1624,7 @@ class BleHelper {
if (fIndex > -1) {
this.data.LinkedList[fIndex].Linked = true;
this.data.LinkedList[fIndex].linkId=linkId;
} else {
this.data.LinkedList.push(cr);
}
@ -1647,12 +1658,7 @@ class BleHelper {
});
}
// 处理 MTU 设置
if (plus.os.name === 'Android') {
this.setMtu(deviceId).catch(ex => {
console.error("mtu设置失败=", ex);
});
}
resolve(true);
}).catch((ex) => {