Merge branch 'main' of http://47.107.152.87:3000/dyf/APP
This commit is contained in:
@ -390,6 +390,7 @@
|
|||||||
}
|
}
|
||||||
if (res.deviceId == these.formData.deviceId) {
|
if (res.deviceId == these.formData.deviceId) {
|
||||||
this.formData.bleStatu = true;
|
this.formData.bleStatu = true;
|
||||||
|
// 重新连接后状态以设备上报为准
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
hideLoading(these, 1000);
|
hideLoading(these, 1000);
|
||||||
});
|
});
|
||||||
@ -406,6 +407,9 @@
|
|||||||
}
|
}
|
||||||
if (res.deviceId == these.formData.deviceId) {
|
if (res.deviceId == these.formData.deviceId) {
|
||||||
this.formData.bleStatu = false;
|
this.formData.bleStatu = false;
|
||||||
|
// 断开连接时先将充电状态复位,避免保持旧值
|
||||||
|
this.formData.statu = '未充电';
|
||||||
|
this.setBleFormData();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
hideLoading(these, 1000);
|
hideLoading(these, 1000);
|
||||||
});
|
});
|
||||||
@ -491,7 +495,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ('statu' in json) {
|
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) {
|
if ('xuhang' in json) {
|
||||||
these.formData.xuhang = json.xuhang;
|
these.formData.xuhang = json.xuhang;
|
||||||
|
|||||||
Reference in New Issue
Block a user