1
0
forked from dyf/APP

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

@ -264,6 +264,20 @@
{
"navigationBarTitleText" : "语音管理"
}
},
{
"path" : "pages/4877/BJQ4877",
"style" :
{
"navigationBarTitleText" : "BJQ 4877"
}
},
{
"path" : "pages/100/HBY100",
"style" :
{
"navigationBarTitleText" : "HBY 100"
}
}

1587
pages/100/HBY100.vue Normal file

File diff suppressed because it is too large Load Diff

1587
pages/4877/BJQ4877.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -357,6 +357,7 @@
these.formData.img = device.devicePic;
these.formData.id = device.id;
these.formData.deviceId = f.deviceId;
these.formData.bleStatu=false;
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
these.formData.bleStatu = true;
});

View File

@ -345,7 +345,7 @@
these.formData.blename = f.name ? f.name : "Unname";
these.formData.deviceName = device.deviceName;
these.formData.img = device.devicePic;
these.formData.bleStatu=false;
these.formData.deviceId = f.deviceId;
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res=>{
these.formData.bleStatu=true;

View File

@ -523,6 +523,7 @@
these.formData['imei'] = these.device.deviceImei;
}
these.getDetail();
these.formData.bleStatu=false;
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
these.formData.bleStatu = true;
});

View File

@ -313,6 +313,7 @@
these.formData.img = device.devicePic;
these.formData.id = device.id;
these.formData.deviceId = f.deviceId;
these.formData.bleStatu=false;
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
console.log("连接成功")
these.formData.bleStatu = true;

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/images/4877/fan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/images/4877/sg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

View File

@ -1587,7 +1587,11 @@ class BleHelper {
}
//向蓝牙设备发送一个字符串的ASCII码
sendString(deviceid, str, writeServiceId, wirteCharactId, ms) {
if (str && str.length) {
if(str && typeof(str)=='object'){
str=JSON.stringify(str);
}
if (str) {
let buffer = new ArrayBuffer(str.length);
let dataView = new DataView(buffer);

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