修复有时候蓝牙配对成功依然提示未连接的异常
This commit is contained in:
@ -459,14 +459,7 @@ created() {
|
||||
}
|
||||
these.device = device;
|
||||
these.getWarns();
|
||||
let f = ble.data.LinkedList.find((v) => {
|
||||
if (v.macAddress == device.deviceMac) {
|
||||
// console.log("找到设备了", v);
|
||||
these.formData.deviceId = v.deviceId;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
let f = these.getDevice();
|
||||
if (!f) {
|
||||
|
||||
|
||||
@ -1304,13 +1297,27 @@ created() {
|
||||
},
|
||||
getDevice: function() {
|
||||
|
||||
// console.log("LinkedList=", ble.data.LinkedList);
|
||||
// console.log("formData=", these.formData);
|
||||
let f = ble.data.LinkedList.find((v) => {
|
||||
return v.macAddress == these.device.deviceMac;
|
||||
});
|
||||
|
||||
return f;
|
||||
|
||||
|
||||
let f = ble.data.LinkedList.find((v) => {
|
||||
let flag=v.macAddress == these.device.deviceMac ;
|
||||
if(!flag && v.device){
|
||||
flag= v.device.id==these.device.id;
|
||||
}
|
||||
if(flag){
|
||||
these.formData.deviceId = v.deviceId;
|
||||
}
|
||||
return flag;
|
||||
});
|
||||
|
||||
// #ifdef WEB
|
||||
f = {
|
||||
deviceId: '123'
|
||||
}
|
||||
// #endif
|
||||
|
||||
return f;
|
||||
|
||||
},
|
||||
|
||||
bleStatuToggle() {
|
||||
|
||||
Reference in New Issue
Block a user