蓝牙配对模式优化,提示信息不正确,loading关闭时机不对的问题

蓝牙配对模式,修复提示不正确,loading关闭太早的问题
This commit is contained in:
liub
2026-01-29 15:05:33 +08:00
parent 3745e5dc13
commit dae3561235
2 changed files with 194 additions and 12 deletions

View File

@ -183,10 +183,23 @@
}
},
onLoad(option) {
debugger;
eventChannel = this.getOpenerEventChannel();
eventChannel.on('detailData', function(rec) {
console.log("接收到父页面的参数:", rec);
these.device = rec.data;
if (rec.data.bluetoothName) {
these.search = rec.data.bluetoothName;
}else if(rec.data.deviceName){
these.search = rec.data.deviceName;
}
startValidDevice();
});
let search = option.search;
these = this;
eventChannel = this.getOpenerEventChannel();
const systemInfo = uni.getSystemInfoSync();
ble = bleTool.getBleTool(); // Ensure ble is initialized
@ -451,16 +464,7 @@
StartSubsrib();
eventChannel.on('detailData', function(rec) {
console.log("接收到父页面的参数:", rec);
these.device = rec.data;
if (rec.data.bluetoothName) {
these.search = rec.data.bluetoothName;
}
startValidDevice();
});
},