修复蓝牙配对时,连接成功马上断开,再次连接提示正在连接中的问题
This commit is contained in:
@ -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({
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user