完成BJQ4877功能开发
14
pages.json
@ -264,6 +264,20 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText" : "语音管理"
|
"navigationBarTitleText" : "语音管理"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/4877/BJQ4877",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "BJQ 4877"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/100/HBY100",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "HBY 100"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1587
pages/100/HBY100.vue
Normal file
1587
pages/4877/BJQ4877.vue
Normal file
@ -357,6 +357,7 @@
|
|||||||
these.formData.img = device.devicePic;
|
these.formData.img = device.devicePic;
|
||||||
these.formData.id = device.id;
|
these.formData.id = device.id;
|
||||||
these.formData.deviceId = f.deviceId;
|
these.formData.deviceId = f.deviceId;
|
||||||
|
these.formData.bleStatu=false;
|
||||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||||
these.formData.bleStatu = true;
|
these.formData.bleStatu = true;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -345,7 +345,7 @@
|
|||||||
these.formData.blename = f.name ? f.name : "Unname";
|
these.formData.blename = f.name ? f.name : "Unname";
|
||||||
these.formData.deviceName = device.deviceName;
|
these.formData.deviceName = device.deviceName;
|
||||||
these.formData.img = device.devicePic;
|
these.formData.img = device.devicePic;
|
||||||
|
these.formData.bleStatu=false;
|
||||||
these.formData.deviceId = f.deviceId;
|
these.formData.deviceId = f.deviceId;
|
||||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res=>{
|
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res=>{
|
||||||
these.formData.bleStatu=true;
|
these.formData.bleStatu=true;
|
||||||
|
|||||||
@ -523,6 +523,7 @@
|
|||||||
these.formData['imei'] = these.device.deviceImei;
|
these.formData['imei'] = these.device.deviceImei;
|
||||||
}
|
}
|
||||||
these.getDetail();
|
these.getDetail();
|
||||||
|
these.formData.bleStatu=false;
|
||||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||||
these.formData.bleStatu = true;
|
these.formData.bleStatu = true;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -313,6 +313,7 @@
|
|||||||
these.formData.img = device.devicePic;
|
these.formData.img = device.devicePic;
|
||||||
these.formData.id = device.id;
|
these.formData.id = device.id;
|
||||||
these.formData.deviceId = f.deviceId;
|
these.formData.deviceId = f.deviceId;
|
||||||
|
these.formData.bleStatu=false;
|
||||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||||
console.log("连接成功")
|
console.log("连接成功")
|
||||||
these.formData.bleStatu = true;
|
these.formData.bleStatu = true;
|
||||||
|
|||||||
BIN
static/images/4877/4877equip.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
static/images/4877/arrow.png
Normal file
|
After Width: | Height: | Size: 946 B |
BIN
static/images/4877/arrowActive.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
static/images/4877/arrowLR.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/images/4877/arrowLRActive.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/images/4877/fan.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/images/4877/fanActive.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
static/images/4877/lightActive.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
static/images/4877/lightt.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/images/4877/sg.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/images/4877/sgActive.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
static/images/common/close.png
Normal file
|
After Width: | Height: | Size: 978 B |
@ -1587,7 +1587,11 @@ class BleHelper {
|
|||||||
}
|
}
|
||||||
//向蓝牙设备发送一个字符串的ASCII码
|
//向蓝牙设备发送一个字符串的ASCII码
|
||||||
sendString(deviceid, str, writeServiceId, wirteCharactId, ms) {
|
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 buffer = new ArrayBuffer(str.length);
|
||||||
let dataView = new DataView(buffer);
|
let dataView = new DataView(buffer);
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,8 @@ class BleReceive {
|
|||||||
'/pages/6155/deviceDetail': this.Receive_6155.bind(this),
|
'/pages/6155/deviceDetail': this.Receive_6155.bind(this),
|
||||||
'/pages/7305/BJQ7305': this.Receive_6155.bind(this),
|
'/pages/7305/BJQ7305': this.Receive_6155.bind(this),
|
||||||
'/pages/650/HBY650': this.Receive_650.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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||