添加报警功能
This commit is contained in:
@ -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:{
|
||||
|
Reference in New Issue
Block a user