From 4391d30f86d17d1cd27adcc68d256631a6a5b4e3 Mon Sep 17 00:00:00 2001 From: liub Date: Thu, 2 Apr 2026 08:45:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5008A=E6=96=B0=E4=BA=A7?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/MsgBox/MsgBox.vue | 2 +- pages.json | 7 + pages/008A/HBY008A.vue | 1268 ++++++++++++++++++++++++++++ pages/6075J/BJQ6075J.vue | 8 +- pages/6170/deviceControl/index.vue | 16 +- pages/650/HBY650.vue | 11 +- pages/670/HBY670.vue | 8 +- pages/common/addDevice/addBle.vue | 17 +- 8 files changed, 1298 insertions(+), 39 deletions(-) create mode 100644 pages/008A/HBY008A.vue diff --git a/components/MsgBox/MsgBox.vue b/components/MsgBox/MsgBox.vue index c7a7d52..41f8d0c 100644 --- a/components/MsgBox/MsgBox.vue +++ b/components/MsgBox/MsgBox.vue @@ -130,7 +130,7 @@ return json; }, - //弹出预定好的三种弹窗 + //弹出预定好的四种弹窗 showMsg(msg, btnTxt, type, okCallback) { let cfg = { diff --git a/pages.json b/pages.json index 772c296..e06e62d 100644 --- a/pages.json +++ b/pages.json @@ -446,6 +446,13 @@ "navigationStyle": "custom", "fullscreen": true } + }, + { + "path" : "pages/008A/HBY008A", + "style" : + { + "navigationBarTitleText" : "HBY008A" + } } ], diff --git a/pages/008A/HBY008A.vue b/pages/008A/HBY008A.vue new file mode 100644 index 0000000..6293c63 --- /dev/null +++ b/pages/008A/HBY008A.vue @@ -0,0 +1,1268 @@ + + + + + \ No newline at end of file diff --git a/pages/6075J/BJQ6075J.vue b/pages/6075J/BJQ6075J.vue index d6310a2..9017abb 100644 --- a/pages/6075J/BJQ6075J.vue +++ b/pages/6075J/BJQ6075J.vue @@ -1067,13 +1067,7 @@ '0')); // 包序号 - if (packetData.length == 250) { - dataView.setUint8(3, 0x01); - dataView.setUint8(4, 0xF4); - } else { - dataView.setUint8(3, 0x00); - dataView.setUint8(4, 0x64); - } + dataView.setUint16(3, packetData.length*2,false); // 包t长度 // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 37b46ba..49e0c3c 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -141,7 +141,7 @@ + :color="'#000000'" :fontSize="14" :returnType="10" /> 人员信息登记 @@ -423,7 +423,7 @@ Status: { pageHide: null }, - inteval: 1000 + inteval: 200 } }, computed: { @@ -921,7 +921,7 @@ json.instruct[1] = parseInt(selectedItem.instructValue); ble.sendString(f.deviceId, json).then(res => { - console.log("ble send success") + console.log("ble send success",json); this.lightModeA = false; }).catch(ex => { console.error("ble send fail,mqsending....") @@ -1226,15 +1226,9 @@ dataView.setUint8(0, 0x55); // 帧头 dataView.setUint8(1, 0x02); // 帧类型:开机画面 dataView.setUint8(2, currentPacket); // 包序号 + dataView.setUint16(3, packetData.length*2,false); // 包t长度 - - if (packetData.length == 250) { - dataView.setUint8(3, 0x01); - dataView.setUint8(4, 0xF4); - } else { - dataView.setUint8(3, 0x00); - dataView.setUint8(4, 0x64); - } + // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue index a42aa07..25866bc 100644 --- a/pages/650/HBY650.vue +++ b/pages/650/HBY650.vue @@ -975,17 +975,10 @@ import request, { baseURL } from '@/utils/request.js'; // 填充头部 dataView.setUint8(0, 0x55); // 帧头 dataView.setUint8(1, 0x02); // 帧类型:开机画面 - dataView.setUint8(2, '0x' + currentPacket.toString(16).padStart(2, - '0')); // 包序号 + dataView.setUint8(2, currentPacket); // 包序号 - if (packetData.length == 250) { - dataView.setUint8(3, 0x01); - dataView.setUint8(4, 0xF4); - } else { - dataView.setUint8(3, 0x00); - dataView.setUint8(4, 0x64); - } + dataView.setUint16(3, packetData.length*2,false); // 包t长度 // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index dd054e8..51c0e12 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -1799,13 +1799,7 @@ '0')); // 包序号 - if (packetData.length == 250) { - dataView.setUint8(3, 0x01); - dataView.setUint8(4, 0xF4); - } else { - dataView.setUint8(3, 0x00); - dataView.setUint8(4, 0x64); - } + dataView.setUint16(3, packetData.length*2,false); // 包t长度 // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { diff --git a/pages/common/addDevice/addBle.vue b/pages/common/addDevice/addBle.vue index 509d0b2..6b76de8 100644 --- a/pages/common/addDevice/addBle.vue +++ b/pages/common/addDevice/addBle.vue @@ -125,7 +125,8 @@ MsgClose, MsgWarning, showPop, - MsgClear + MsgClear, + MsgInfo } from '@/utils/MsgPops.js'; import MQTT from '@/utils/MqHelper.js'; @@ -412,8 +413,7 @@ } - arr[i].name = arr[i].name.replace(/\r\n/g, '').replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - ''); + arr[i].name = arr[i].name.replace(/\r\n/g, '').replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,''); @@ -557,13 +557,22 @@ setTimeout(()=>{ - MsgSuccess("如需要在PC上查看此数据,请复制链接后在PC端打开,然后点右上角扫码授权","复制链接",these,()=>{ + MsgInfo("如需要在PC上查看此数据,请复制链接后通过微信发送到PC,在PC端打开,然后点右上角扫码授权","复制链接",these,true,()=>{ + console.log("执行复制"); uni.setClipboardData({ data:'https://static-mp-5b7c35fc-f6fe-4100-a2e1-3669e4d4bfc9.next.bspapp.com/AppTools/views/index.html', success(){ uni.showToast({ title:'已复制链接' }); + + + plus.runtime.openURL('weixin://', (err) => { + MsgError("打开微信失败,请手动打开微信粘贴"); + }); + }, + fail(ex){ + console.error("无法复制",ex) } }); });