删除测试App的部分文件,修复loading有时不显示的问题
This commit is contained in:
@ -171,6 +171,7 @@
|
||||
},
|
||||
onLoad(option) {
|
||||
let search = option.search;
|
||||
ble = bleTool.getBleTool();
|
||||
these = this;
|
||||
eventChannel = this.getOpenerEventChannel();
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
@ -216,7 +217,7 @@
|
||||
}
|
||||
let StartSubsrib = () => {
|
||||
these.EquipMents = [];
|
||||
ble = bleTool.getBleTool();
|
||||
|
||||
//蓝牙不可用的回调
|
||||
ble.addStateBreakCallback(res => {
|
||||
if (these.Status.isPageHidden) {
|
||||
@ -291,7 +292,9 @@
|
||||
|
||||
}, pagePath);
|
||||
//搜索到新设备的回调
|
||||
|
||||
ble.addDeviceFound((arr) => {
|
||||
// console.log("发现设备", arr);
|
||||
if (these.Status.isPageHidden) {
|
||||
return;
|
||||
}
|
||||
@ -352,17 +355,18 @@
|
||||
|
||||
}, pagePath);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (search) {
|
||||
StartSubsrib();
|
||||
}
|
||||
|
||||
|
||||
StartSubsrib();
|
||||
|
||||
|
||||
eventChannel.on('detailData', function(rec) {
|
||||
console.log("接收到父页面的参数:", rec);
|
||||
these.device = rec.data;
|
||||
StartSubsrib();
|
||||
console.log("11111")
|
||||
|
||||
these.refreshBleList();
|
||||
});
|
||||
|
||||
@ -386,11 +390,11 @@
|
||||
|
||||
Promise.allSettled(promis).finally(() => {
|
||||
ble.StopSearch().finally(res => {
|
||||
console.log("停止搜索成功");
|
||||
console.log("停止搜索成功");
|
||||
these.EquipMents = [];
|
||||
these.PairEquip = [];
|
||||
ble.StartSearch().then(result => {
|
||||
console.log("开始搜索成功");
|
||||
console.log("开始搜索成功");
|
||||
}).catch(err => {
|
||||
console.error("开始搜索失败,err=", err);
|
||||
if (err.code === 10001) {
|
||||
|
||||
Reference in New Issue
Block a user