添加报警功能

This commit is contained in:
liub
2025-08-28 14:05:06 +08:00
parent c2aa8bfa2f
commit 9846fe2315
18 changed files with 1212 additions and 444 deletions

View File

@ -136,7 +136,7 @@
},
onHide: function() {
ble.StopSearch();
ble.removeReceiveCallback(pagePath);
},
onBackPress: (e) => {
ble.StopSearch();
@ -145,8 +145,7 @@
},
onUnload(){
ble.StopSearch();
ble.removeDeviceFound(pagePath);
ble.removeReceiveCallback(pagePath);
},
onLoad() {
these = this;
@ -172,7 +171,12 @@
}
}
},pagePath);
// ble.addReceiveCallback((receivData) => {
// console.log("收到数据了:", receivData);//数据格式:{bytes:[109,97],str:"",hexs:"FA 01"}
// // let data=uni.getStorageSync(ble.StorageKey);
// console.log("LinkedList=",ble.data.LinkedList);
// },pagePath);
},
onShow: function() {
@ -187,12 +191,7 @@
});
ble.addReceiveCallback((receivData) => {
console.log("收到数据了:", receivData);//数据格式:{bytes:[109,97],str:"",hexs:"FA 01"}
console.log("LinkedList=",ble.data.LinkedList);
let data=uni.getStorageSync(ble.StorageKey);
console.log("data=",data);
},pagePath);
},
@ -241,7 +240,7 @@
these.PairEquip.push(item);
}
ble.removeReceiveCallback(pagePath);
console.log("连接成功");
uni.navigateTo({
url:"/pages/common/addBLE/LinkBle",
events:{