完成6075J蓝牙对接
This commit is contained in:
@ -651,7 +651,7 @@ class BleHelper {
|
||||
BleReceive() {
|
||||
uni.onBLECharacteristicValueChange((receive) => {
|
||||
//订阅消息
|
||||
// console.log("收到订阅消息", receive);
|
||||
console.log("收到订阅消息", receive);
|
||||
let f = this.data.LinkedList.find((v) => {
|
||||
return v.deviceId == receive.deviceId;
|
||||
})
|
||||
|
||||
@ -14,7 +14,8 @@ class BleReceive {
|
||||
'/pages/100/HBY100': this.Receive_100.bind(this),
|
||||
'/pages/102/HBY102': this.Receive_102.bind(this),
|
||||
'/pages/6170/deviceControl/index':this.Receive_6170.bind(this),
|
||||
'/pages/100J/HBY100-J': this.Receive_100J.bind(this)
|
||||
'/pages/100J/HBY100-J': this.Receive_100J.bind(this),
|
||||
'/pages/6075J/BJQ6075J':this.Receive_6075.bind(this)
|
||||
};
|
||||
}
|
||||
|
||||
@ -893,7 +894,36 @@ Receive_6170(receive, f, path, recArr) {
|
||||
}
|
||||
|
||||
|
||||
Receive_6075(receive,f,path,recArr){
|
||||
let receiveData = {};
|
||||
|
||||
try {
|
||||
|
||||
receiveData = JSON.parse(receive.str);
|
||||
|
||||
let recCnt = recArr.find(v => {
|
||||
return v.key.replace(/\//g, "").toLowerCase() == f.device.detailPageUrl
|
||||
.replace(/\//g, "").toLowerCase();
|
||||
});
|
||||
if (!recCnt) {
|
||||
// if (receiveData.sta_PowerPercent <= 20) {
|
||||
// uni.showModal({
|
||||
// title: "提示",
|
||||
// content: "设备'" + f.device.deviceName + "'电量低",
|
||||
// showCancel: false
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
receiveData = {};
|
||||
console.log("文本解析失败", error)
|
||||
}
|
||||
return receiveData;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -282,7 +282,7 @@ export default {
|
||||
value: "46",
|
||||
label: "手动报警",
|
||||
checked: false,
|
||||
type: ['210','102']
|
||||
type: ['210','102','6170']
|
||||
},
|
||||
{
|
||||
value: "47",
|
||||
|
||||
Reference in New Issue
Block a user