蓝牙模块添加在web平台默认成功方便调试功能,4877功能完成
This commit is contained in:
@ -156,14 +156,39 @@
|
||||
if (these.device.deviceId == receive.deviceId) {
|
||||
console.log("11111:", receive);
|
||||
these.device.imei = f.imei;
|
||||
if (receive.bytes[0] == 0xFC || receive.str.indexOf('mac address:') == 0) {
|
||||
let flag=false;
|
||||
if (receive.bytes && receive.bytes.length && receive.bytes[0] == 0xFC) {//6155 7305
|
||||
if (f && f.macAddress) {
|
||||
these.device.macAddress = f.macAddress;
|
||||
console.log("222222");
|
||||
these.Statu.isSearch = false;
|
||||
these.initDevice();
|
||||
flag=true;
|
||||
}
|
||||
}
|
||||
else if(receive.str.indexOf('mac address:') == 0){//650 670
|
||||
if (f && f.macAddress) {
|
||||
flag=true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
try{
|
||||
let json=JSON.parse(receive.str);
|
||||
let key = "sta_address";
|
||||
if (key in json) {//100
|
||||
if (f && f.macAddress) {
|
||||
flag=true;
|
||||
}
|
||||
}
|
||||
}catch(err){
|
||||
console.log("出现异常,",err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(flag){
|
||||
these.device.macAddress = f.macAddress;
|
||||
console.log("222222");
|
||||
these.Statu.isSearch = false;
|
||||
these.initDevice();
|
||||
}
|
||||
|
||||
}
|
||||
}, pagePath);
|
||||
eventChannel = this.getOpenerEventChannel();
|
||||
|
||||
Reference in New Issue
Block a user