From 7cfbfdfce37fd88433405cbbfe6740fcc343f01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=BE=AE=E4=B8=80=E7=AC=91?= <709648985@qq.com> Date: Tue, 24 Mar 2026 15:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D100J=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100J/HBY100-J.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index 69be8db..5fcebf9 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -700,12 +700,18 @@ } }, bleStatuToggle() { + const mac = (this.device && this.device.deviceMac) || (this.deviceInfo && this.deviceInfo.deviceMac); + if (!mac) return; + const macNorm = (m) => (m || '').replace(/:/g, '').toUpperCase(); + const targetMacNorm = macNorm(mac); + const last6 = targetMacNorm.slice(-6); let f = bleTool.data.LinkedList.find((v) => { - return v.macAddress == this.device.deviceMac; + const m = macNorm(v.macAddress || ''); + return m === targetMacNorm || (m.length >= 6 && m.slice(-6) === last6); }); if (!f) { - this.tryConnect100JBle(this.device.deviceMac); + this.tryConnect100JBle(mac); return; } if (this.formData.bleStatu === true) { @@ -757,8 +763,8 @@ // 关闭状态 that.formData.sta_LightType = '-1'; } - if (this.formData_VoiceType == 7) { - this.formData.sta_VoiceType = res.data.voiceStrobeAlarm ?? 0; + if (this.formData.sta_VoiceType === '7' || this.formData.sta_VoiceType === 7) { + this.formData.sta_VoiceType = (res.data.voiceStrobeAlarm ?? 0) + ''; } else { this.formData.sta_VoiceType = res.data.alarmMode + '' }