完成HBY102
This commit is contained in:
@ -7,7 +7,8 @@ class BleReceive {
|
||||
'/pages/650/HBY650': this.Receive_650.bind(this),
|
||||
'/pages/670/HBY670': this.Receive_670.bind(this),
|
||||
'/pages/4877/BJQ4877': this.Receive_4877.bind(this),
|
||||
'/pages/100/HBY100': this.Receive_100.bind(this)
|
||||
'/pages/100/HBY100': this.Receive_100.bind(this),
|
||||
'/pages/102/HBY102':this.Receive_102.bind(this)
|
||||
};
|
||||
}
|
||||
|
||||
@ -560,6 +561,44 @@ class BleReceive {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Receive_102(receive,f,path,recArr){
|
||||
let receiveData={};
|
||||
|
||||
try {
|
||||
|
||||
console.log("str=",receive.str);
|
||||
receiveData = JSON.parse(receive.str);
|
||||
|
||||
let recCnt = recArr.find(v => {
|
||||
return v.key.replace(/\//g, "").toLowerCase() == f.device.detailPageUrl
|
||||
.replace(/\//g, "").toLowerCase();
|
||||
});
|
||||
if (!recCnt) {
|
||||
if (receiveData.sta_PowerPercent<=20) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "设备电量低",
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
if (receiveData.sta_Intrusion===1) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "闯入报警中",
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
receiveData = {};
|
||||
console.log("文本解析失败",error)
|
||||
}
|
||||
return receiveData;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user