From fc88bd6f7dbcd18f709bfd09e400e30d269e137c Mon Sep 17 00:00:00 2001 From: liub Date: Tue, 10 Feb 2026 15:45:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E5=B0=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/6170/callPolice.js | 4 ++++ manifest.json | 2 +- pages/6155/deviceDetail.vue | 2 +- pages/650/HBY650.vue | 2 +- pages/670/HBY670.vue | 2 +- pages/common/addBLE/addEquip.vue | 30 +++++++++++++++++------------- utils/BleHelper.js | 24 +----------------------- utils/Common.js | 25 +++++++++++++++++++++++++ 8 files changed, 51 insertions(+), 40 deletions(-) diff --git a/api/6170/callPolice.js b/api/6170/callPolice.js index 88a5e01..ccbac70 100644 --- a/api/6170/callPolice.js +++ b/api/6170/callPolice.js @@ -6,4 +6,8 @@ export function deviceSendAlarmMessage(data) { method: 'post', data: data }) +} + +export function deviceDefaultAlarm(data){ + return Promise.reject(data); } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 0a790f3..0e8e898 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "星汉物联", "appid" : "__UNI__A21EF43", "description" : "设备管控", - "versionName" : "1.0.16", + "versionName" : "1.0.17", "versionCode" : "100", "transformPx" : false, /* 5+App特有相关 */ diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue index 435ebb3..3a2852e 100644 --- a/pages/6155/deviceDetail.vue +++ b/pages/6155/deviceDetail.vue @@ -715,7 +715,7 @@ return new Promise((resolve, reject) => { // 创建RGB565格式的像素数据 // console.log("pixels=",pixels); - const arr = ble.convertToRGB565(pixels, 'bgr'); + const arr = Common.convertToRGB565(pixels, 'bgr'); var list = []; let index = 0; // 用于追踪arr的当前位置 diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue index 54af5db..afdeab6 100644 --- a/pages/650/HBY650.vue +++ b/pages/650/HBY650.vue @@ -1029,7 +1029,7 @@ import request, { baseURL } from '@/utils/request.js'; }); these.Status.BottomMenu.show = false; - these.rgb565Data = ble.convertToRGB565(data.piexls); + these.rgb565Data = Common.convertToRGB565(data.piexls); setTimeout(function() { sendImagePackets().catch(() => { diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index 6ab07f6..34208cf 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -1848,7 +1848,7 @@ these.Status.BottomMenu.show = false; these.picPath = data.picPath; - these.rgb565Data = ble.convertToRGB565(data.piexls); + these.rgb565Data = Common.convertToRGB565(data.piexls); setTimeout(function() { sendImagePackets().catch(() => { diff --git a/pages/common/addBLE/addEquip.vue b/pages/common/addBLE/addEquip.vue index 8a8c8f6..371aca4 100644 --- a/pages/common/addBLE/addEquip.vue +++ b/pages/common/addBLE/addEquip.vue @@ -910,7 +910,7 @@ position: absolute; border-radius: 50%; background-color: #bbe60033; - + display: inline-block; transform: translate(-50%, -50%); border: 1rpx solid #bbe6003d; @@ -927,18 +927,22 @@ @keyframes expand { 0% { - width: 0; - height: 0; - opacity: 0.9; - } - - - - 100% { - width: 18rem; - height: 18rem; - opacity: 0; - } + width: 0; + height: 0; + opacity: 0.8; + } + + 90% { + width: 18rem; + height: 18rem; + opacity: 0; + } + + 100% { + width: 0rem; + height: 0rem; + opacity: 0; + } } .mainContent { diff --git a/utils/BleHelper.js b/utils/BleHelper.js index 8f35d96..7c9d6dc 100644 --- a/utils/BleHelper.js +++ b/utils/BleHelper.js @@ -2030,29 +2030,7 @@ class BleHelper { } - //将点阵数据转换成RGB565 - convertToRGB565(pixels, type) { - if (!type) { - type = 'rgb'; - } - const result = new Uint16Array(pixels.length / 4); - let index = 0; - for (let i = 0; i < pixels.length; i += 4) { - let r = pixels[i]; - let g = pixels[i + 1]; - let b = pixels[i + 2]; - let a = pixels[i + 3]; - - if (type == 'bgr') { - result[index++] = ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3); - } else { - result[index++] = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3); - } - - } - - return result; - } + diff --git a/utils/Common.js b/utils/Common.js index 756a443..3570666 100644 --- a/utils/Common.js +++ b/utils/Common.js @@ -462,5 +462,30 @@ export default { url='https://www.pgyer.com/xhwl'; } return {os:os,url:url}; + }, + + + //将点阵数据转换成RGB565 + convertToRGB565(pixels, type) { + if (!type) { + type = 'rgb'; + } + const result = new Uint16Array(pixels.length / 4); + let index = 0; + for (let i = 0; i < pixels.length; i += 4) { + let r = pixels[i]; + let g = pixels[i + 1]; + let b = pixels[i + 2]; + let a = pixels[i + 3]; + + if (type == 'bgr') { + result[index++] = ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3); + } else { + result[index++] = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3); + } + + } + + return result; } } \ No newline at end of file