diff --git a/App.vue b/App.vue
new file mode 100644
index 0000000..35e20f9
--- /dev/null
+++ b/App.vue
@@ -0,0 +1,178 @@
+
+
+
\ No newline at end of file
diff --git a/pages/common/addBLE/addEquip.vue b/pages/common/addBLE/addEquip.vue
index b1e2046..102bec6 100644
--- a/pages/common/addBLE/addEquip.vue
+++ b/pages/common/addBLE/addEquip.vue
@@ -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();
-
- });
+
},