完成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

@ -28,14 +28,14 @@
</view>
<view class="rightTxt">
<view class="row">
<image class="img" src="/static/images/6155/DeviceDetail/battry.png" mode="aspectFit"></image>
<image class="img" src="/static/images/common/battry.png" mode="aspectFit"></image>
<view class="txt">
<view class="bigTxt">{{formData.sta_PowerPercent}}%</view>
<view class="smallTxt">电量</view>
</view>
</view>
<view class="row">
<image class="img" src="/static/images/6155/DeviceDetail/time.png" mode="aspectFit"></image>
<image class="img" src="/static/images/common/time.png" mode="aspectFit"></image>
<view class="txt">
<view class="bigTxt">{{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }}
</view>
@ -526,7 +526,7 @@
these.formData.bleStatu = true;
});
}
this.getWarns();
// this.getLinkedCnt();
},
computed: {
@ -673,7 +673,7 @@
}
let warnKey = "102_" + these.device.id + "_warning";
let linkKey = "102_" + these.device.id + "_linked";
// let linkKey = "102_" + these.device.id + "_linked";
let p1 = new Promise((succ, err) => {
uni.getStorage({
key: warnKey,
@ -690,33 +690,33 @@
});
});
let p2 = new Promise((succ, err) => {
uni.getStorage({
key: linkKey,
success(res) {
console.error("获取到联机数据", res);
let data = res.data;
let fs = data.filter(v => {
return !v.read
});
console.error("未读联机数据", fs);
succ(fs);
},
fail(ex) {
err(null);
}
});
});
// let p2 = new Promise((succ, err) => {
// uni.getStorage({
// key: linkKey,
// success(res) {
// console.error("获取到联机数据", res);
// let data = res.data;
// let fs = data.filter(v => {
// return !v.read
// });
// console.error("未读联机数据", fs);
// succ(fs);
// },
// fail(ex) {
// err(null);
// }
// });
// });
Promise.allSettled([p1, p2]).then(results => {
Promise.allSettled([p1]).then(results => {
let fs = [];
if (results[0].status == 'fulfilled') {
fs = fs.concat(results[0].value);
}
if (results[1].status == 'fulfilled') {
fs = fs.concat(results[1].value);
}
// if (results[1].status == 'fulfilled') {
// fs = fs.concat(results[1].value);
// }
console.error("获取到未读消息", fs);
these.$set(these.Status.navbar.icons[0], "math", fs.length);
});
@ -945,7 +945,7 @@
sosSetting(item, isOk) {
debugger;
if (!this.permissions.includes('46') && this.Status.apiType !== 'listA') {
this.showPop({
@ -1034,7 +1034,8 @@
});
} else {
task(item.key);
let newval=this.formData.sta_LedType===item.key?'led_off':item.key;
task(newval);
}
}
@ -1155,7 +1156,7 @@
this.Status.BottomMenu.activeIndex = active;
let msg = [];
if (json.sta_PowerPercent <= 20 && (json.sta_charge === 0 || json.sta_charge === '0')) {
if (json.sta_PowerPercent <= 20 && json.sta_PowerPercent!=this.formData.sta_PowerPercent && (json.sta_charge === 0 || json.sta_charge === '0')) {
msg.push("设备电量低");
}