From 6fcf9c814bf6545785c00684afe8a1336cf67e8d 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: Mon, 15 Dec 2025 16:00:29 +0800 Subject: [PATCH] =?UTF-8?q?7305=E5=85=85=E7=94=B5=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/7305/BJQ7305.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue index 5c92671..7006bc8 100644 --- a/pages/7305/BJQ7305.vue +++ b/pages/7305/BJQ7305.vue @@ -390,6 +390,7 @@ } if (res.deviceId == these.formData.deviceId) { this.formData.bleStatu = true; + // 重新连接后状态以设备上报为准 setTimeout(() => { hideLoading(these, 1000); }); @@ -406,6 +407,9 @@ } if (res.deviceId == these.formData.deviceId) { this.formData.bleStatu = false; + // 断开连接时先将充电状态复位,避免保持旧值 + this.formData.statu = '未充电'; + this.setBleFormData(); setTimeout(() => { hideLoading(these, 1000); }); @@ -491,7 +495,9 @@ } }); if ('statu' in json) { - these.formData.statu = json.statu == '1' ? '充电中' : '未充电'; + const chargingVal = json.statu; + const isCharging = chargingVal === 1 || chargingVal === '1' || chargingVal === true || chargingVal === '充电中'; + these.formData.statu = isCharging ? '充电中' : '未充电'; } if ('xuhang' in json) { these.formData.xuhang = json.xuhang;