From dae356123557ea0e302442abe08af85411230d08 Mon Sep 17 00:00:00 2001 From: liub Date: Thu, 29 Jan 2026 15:05:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=93=9D=E7=89=99=E9=85=8D=E5=AF=B9=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96=EF=BC=8C=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=8D=E6=AD=A3=E7=A1=AE=EF=BC=8Cloading=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=97=B6=E6=9C=BA=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E8=93=9D=E7=89=99=E9=85=8D=E5=AF=B9=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=8F=90=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=EF=BC=8Cloading=E5=85=B3=E9=97=AD=E5=A4=AA?= =?UTF-8?q?=E6=97=A9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 178 +++++++++++++++++++++++++++++++ pages/common/addBLE/addEquip.vue | 28 ++--- 2 files changed, 194 insertions(+), 12 deletions(-) create mode 100644 App.vue 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(); - - }); + },