优化100J代码
This commit is contained in:
@ -736,8 +736,11 @@
|
||||
}
|
||||
if (this.formData.bleStatu === true) {
|
||||
this.formData.bleStatu = 'dicconnect';
|
||||
bleTool.disconnectDevice(f.deviceId).finally(r => {
|
||||
bleTool.disconnectDevice(f.deviceId).finally(() => {
|
||||
this.formData.bleStatu = false;
|
||||
if (this.deviceInfo && this.deviceInfo.deviceId) {
|
||||
updateBleStatus(false, '', this.deviceInfo.deviceId);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -1182,6 +1185,9 @@
|
||||
bleTool.StopSearch();
|
||||
bleTool.removeDeviceFound('HBY100J_SCAN');
|
||||
console.log('100J 蓝牙扫描超时,将使用4G');
|
||||
that.formData.bleStatu = false;
|
||||
const devId = that.deviceInfo && that.deviceInfo.deviceId;
|
||||
if (devId) updateBleStatus(false, '', devId);
|
||||
}, timeout);
|
||||
|
||||
bleTool.addDeviceFound((res) => {
|
||||
@ -1219,6 +1225,9 @@
|
||||
clearTimeout(timer);
|
||||
bleTool.removeDeviceFound('HBY100J_SCAN');
|
||||
console.log('100J 蓝牙扫描启动失败,将使用4G', err);
|
||||
that.formData.bleStatu = 'err';
|
||||
const devId = that.deviceInfo && that.deviceInfo.deviceId;
|
||||
if (devId) updateBleStatus(false, '', devId);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user