完成6075J蓝牙对接

This commit is contained in:
liub
2026-03-30 13:17:47 +08:00
parent 4e518e7340
commit 37f5047a46
32 changed files with 472 additions and 281 deletions

View File

@ -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;
})

View File

@ -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;
}
}

View File

@ -282,7 +282,7 @@ export default {
value: "46",
label: "手动报警",
checked: false,
type: ['210','102']
type: ['210','102','6170']
},
{
value: "47",