1
0
forked from dyf/APP

修复首页蓝牙连接断开时更新状态,修复670 SOS报警时红色提示

This commit is contained in:
liub
2025-12-24 14:47:21 +08:00
parent fce2f2ebcf
commit 830288e107
3 changed files with 68 additions and 30 deletions

View File

@ -258,7 +258,7 @@ class BleReceive {
Receive_670(receive, f, path, recArr) {
// console.log("pagh=", path);
var todo = (bytes) => {
// console.log("todo",receive);
console.log("todo",receive);
let receiveData = {};
if (bytes[0] == 0x55) {
try {
@ -319,7 +319,7 @@ class BleReceive {
receiveData.staticWarn = staticWarn;
receiveData.fourGStrenth = fourGStrenth;
receiveData.SOS = sosTxt;
receiveData.qzwarn = sosTxt==='sg';
this.setBleFormData(receiveData, f);
console.log("recArr=", recArr);
let recCnt = recArr.find(v => {
@ -327,16 +327,25 @@ class BleReceive {
.replace(/\//g, "").toLowerCase();
});
if (!recCnt) {
if (this.formData.staticWarn) { //有静止报警
let msgs=[];
if(receiveData.qzwarn){
msgs.push("声光报警中");
}
if (staticWarn) { //有静止报警
msgs.push("静止报警中");
}
if(msgs.length>0){
msgs="设备'"+f.device.deviceName+msgs.join(";");
uni.showModal({
title: "警告",
content: "设备'"+f.device.deviceName+"'静止报警中",
content:msgs,
showCancel: false
});
}
}
} catch (error) {
console.log('数据解析错误:', error);
console.error('数据解析错误:', error);
}
// console.log("todo");
} else {