完成BJQ4877功能开发

This commit is contained in:
liub
2025-10-24 17:21:18 +08:00
parent 0909d9f023
commit d37ccfeabc
21 changed files with 3227 additions and 3 deletions

View File

@ -5,7 +5,8 @@ class BleReceive {
'/pages/6155/deviceDetail': this.Receive_6155.bind(this),
'/pages/7305/BJQ7305': this.Receive_6155.bind(this),
'/pages/650/HBY650': this.Receive_650.bind(this),
'/pages/670/HBY670': this.Receive_670.bind(this)
'/pages/670/HBY670': this.Receive_670.bind(this),
'/pages/4877/BJQ4877': this.Receive_4877.bind(this),
};
}
@ -490,6 +491,34 @@ class BleReceive {
}
}
Receive_4877(receive,f,path,recArr){
let receiveData={};
try {
console.log("str=",receive.str);
receiveData = JSON.parse(receive.str);
let recCnt = recArr.find(v => {
return v.key.replaceAll('/', '').toLowerCase() == f.device.detailPageUrl
.replaceAll('/', '').toLowerCase();
});
if (!recCnt) {
if (receiveData.sta_PowerPercent<=20) {
uni.showModal({
title: "提示",
content: "设备电量低",
showCancel: false
});
}
}
} catch (error) {
receiveData = {};
console.log("文本解析失败",error)
}
return receiveData;
}
}