diff --git a/pages/6075J/BJQ6075J.vue b/pages/6075J/BJQ6075J.vue index 7ba3a54..19b6a83 100644 --- a/pages/6075J/BJQ6075J.vue +++ b/pages/6075J/BJQ6075J.vue @@ -624,6 +624,9 @@ this.$watch("formData.sta_PowerPercent", (newVal, oldVal) => { console.log("电量发生变化"); + if(!newVal){ + return; + } if (newVal <= 20 && (this.formData.sta_system === 2 || this.formData.sta_system === 0)) { //电量在20%及以及下,且是未充电状态提醒 showPop({ diff --git a/pages/common/addBLE/addEquip.vue b/pages/common/addBLE/addEquip.vue index 84b565a..12fda5b 100644 --- a/pages/common/addBLE/addEquip.vue +++ b/pages/common/addBLE/addEquip.vue @@ -310,15 +310,12 @@ if (these.Status.isPageHidden) { return; } - // console.log("处理蓝牙断开连接"); - - - these.refreshLinked(); - - setTimeout(() => { - hideLoading(these); + console.log("处理蓝牙断开连接"); + if(res.deviceId==this.item.deviceId){ + these.item.deviceId = null; + these.refreshLinked(); clearInterval(these.Status.intval); - }, 1500); + } }, pagePath); diff --git a/utils/BleHelper.js b/utils/BleHelper.js index 00169f0..973d6b1 100644 --- a/utils/BleHelper.js +++ b/utils/BleHelper.js @@ -946,7 +946,9 @@ class BleHelper { return false; }); this.updateCache(); + if (f && f.device && f.device.id && this.data.available) { + //已绑定过的设备尝试重连 let fdis = this.data.Disconnect.find(dis => { return dis === res.deviceId }); //用户主动断开的,不再重连 @@ -967,6 +969,9 @@ class BleHelper { } + }else{ + //未绑定过的设备播放连接锁 + delete this.data.connectingDevices[res.deviceId]; } if (this.cfg.bleDisposeCallback.length > 0) { @@ -1626,7 +1631,6 @@ class BleHelper { } } - if (this.data.platform == 'web') { LinkedCallback(); return Promise.resolve(true);