diff --git a/pages.json b/pages.json index 9d31d7c..2382871 100644 --- a/pages.json +++ b/pages.json @@ -264,6 +264,20 @@ { "navigationBarTitleText" : "语音管理" } + }, + { + "path" : "pages/4877/BJQ4877", + "style" : + { + "navigationBarTitleText" : "BJQ 4877" + } + }, + { + "path" : "pages/100/HBY100", + "style" : + { + "navigationBarTitleText" : "HBY 100" + } } diff --git a/pages/100/HBY100.vue b/pages/100/HBY100.vue new file mode 100644 index 0000000..1204dd4 --- /dev/null +++ b/pages/100/HBY100.vue @@ -0,0 +1,1587 @@ + + + + + \ No newline at end of file diff --git a/pages/4877/BJQ4877.vue b/pages/4877/BJQ4877.vue new file mode 100644 index 0000000..1204dd4 --- /dev/null +++ b/pages/4877/BJQ4877.vue @@ -0,0 +1,1587 @@ + + + + + \ No newline at end of file diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue index e1daf46..e073e50 100644 --- a/pages/6155/deviceDetail.vue +++ b/pages/6155/deviceDetail.vue @@ -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; }); diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue index 7c95e0f..b3d7e1b 100644 --- a/pages/650/HBY650.vue +++ b/pages/650/HBY650.vue @@ -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; diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index 86f66fb..8159e85 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -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; }); diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue index cb0a35e..ad56a7a 100644 --- a/pages/7305/BJQ7305.vue +++ b/pages/7305/BJQ7305.vue @@ -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; diff --git a/static/images/4877/4877equip.png b/static/images/4877/4877equip.png new file mode 100644 index 0000000..dff8be2 Binary files /dev/null and b/static/images/4877/4877equip.png differ diff --git a/static/images/4877/arrow.png b/static/images/4877/arrow.png new file mode 100644 index 0000000..1ae3719 Binary files /dev/null and b/static/images/4877/arrow.png differ diff --git a/static/images/4877/arrowActive.png b/static/images/4877/arrowActive.png new file mode 100644 index 0000000..1a59669 Binary files /dev/null and b/static/images/4877/arrowActive.png differ diff --git a/static/images/4877/arrowLR.png b/static/images/4877/arrowLR.png new file mode 100644 index 0000000..885e89a Binary files /dev/null and b/static/images/4877/arrowLR.png differ diff --git a/static/images/4877/arrowLRActive.png b/static/images/4877/arrowLRActive.png new file mode 100644 index 0000000..6d82055 Binary files /dev/null and b/static/images/4877/arrowLRActive.png differ diff --git a/static/images/4877/fan.png b/static/images/4877/fan.png new file mode 100644 index 0000000..7cbb21c Binary files /dev/null and b/static/images/4877/fan.png differ diff --git a/static/images/4877/fanActive.png b/static/images/4877/fanActive.png new file mode 100644 index 0000000..f501418 Binary files /dev/null and b/static/images/4877/fanActive.png differ diff --git a/static/images/4877/lightActive.png b/static/images/4877/lightActive.png new file mode 100644 index 0000000..46c41b7 Binary files /dev/null and b/static/images/4877/lightActive.png differ diff --git a/static/images/4877/lightt.png b/static/images/4877/lightt.png new file mode 100644 index 0000000..d8d42e2 Binary files /dev/null and b/static/images/4877/lightt.png differ diff --git a/static/images/4877/sg.png b/static/images/4877/sg.png new file mode 100644 index 0000000..f119272 Binary files /dev/null and b/static/images/4877/sg.png differ diff --git a/static/images/4877/sgActive.png b/static/images/4877/sgActive.png new file mode 100644 index 0000000..e276244 Binary files /dev/null and b/static/images/4877/sgActive.png differ diff --git a/static/images/common/close.png b/static/images/common/close.png new file mode 100644 index 0000000..75704fa Binary files /dev/null and b/static/images/common/close.png differ diff --git a/utils/BleHelper.js b/utils/BleHelper.js index ba87d86..9e65d02 100644 --- a/utils/BleHelper.js +++ b/utils/BleHelper.js @@ -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); diff --git a/utils/BleReceive.js b/utils/BleReceive.js index 1f9552c..df86874 100644 --- a/utils/BleReceive.js +++ b/utils/BleReceive.js @@ -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; + + } }