更新100、670电量低的提示方式为监听式
This commit is contained in:
@ -486,10 +486,14 @@
|
||||
},
|
||||
onLoad: function() {
|
||||
|
||||
|
||||
these = this;
|
||||
recei = BleReceive.getBleReceive();
|
||||
ble = BleTool.getBleTool();
|
||||
this.$watch("formData.battary", (newVal, oldVal) => {
|
||||
if (newVal <= 20 && this.formData.sta_system==2) {
|
||||
this.showMsg("设备电量低");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
ble.addReceiveCallback(these.bleValueNotify, pagePath);
|
||||
@ -928,30 +932,16 @@
|
||||
// console.log("收到文本回复", payload);
|
||||
// // this.SendTxtMQ(json);
|
||||
// }
|
||||
if (keys.indexOf('sta_BreakNews') > -
|
||||
1) { //紧急通知
|
||||
if (json.sta_BreakNews ===
|
||||
'I get it'
|
||||
) // && this.Status.msgOkTime && this.Status.msgOkIntval){
|
||||
{
|
||||
these.showPop({
|
||||
showPop: true,
|
||||
message: "用户已确认收到紧急通知",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png"
|
||||
});
|
||||
|
||||
// this.Status.msgOkTime=null
|
||||
// clearInterval(this.Status.msgOkIntval);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// else {
|
||||
// console.log("收到不能处理的数据", payload);
|
||||
// }
|
||||
|
||||
|
||||
if (keys.indexOf('sta_BreakNews') > -1) { //紧急通知
|
||||
if(json.sta_BreakNews=='I get it'){
|
||||
these.showPop({
|
||||
showPop: true,
|
||||
message: "用户已确认收到紧急通知",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("无法解析此消息", payload);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user