From 274c037eeac599920a573226679b4890afe32d7f Mon Sep 17 00:00:00 2001 From: liub Date: Wed, 4 Feb 2026 09:08:59 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D6155=E4=B8=B2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- pages/6155/BJQ6155.vue | 6 +++--- pages/6155/deviceDetail.vue | 6 +++--- pages/7305/BJQ7305.vue | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manifest.json b/manifest.json index d9ccd8e..0a790f3 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "星汉物联", "appid" : "__UNI__A21EF43", "description" : "设备管控", - "versionName" : "1.0.15", + "versionName" : "1.0.16", "versionCode" : "100", "transformPx" : false, /* 5+App特有相关 */ diff --git a/pages/6155/BJQ6155.vue b/pages/6155/BJQ6155.vue index 84e0fbb..1948f63 100644 --- a/pages/6155/BJQ6155.vue +++ b/pages/6155/BJQ6155.vue @@ -656,7 +656,7 @@ proParam: function() { uni.navigateTo({ - url: '/pages/common/productDes/index?id=' + this.formData.id, + url: '/pages/common/productDes/index?id=' + this.device.id, success(ev) { } @@ -664,7 +664,7 @@ }, handRemark: function() { uni.navigateTo({ - url: '/pages/common/operatingInstruct/index?id=' + this.formData.id, + url: '/pages/common/operatingInstruct/index?id=' + this.device.id, success(ev) { } @@ -672,7 +672,7 @@ }, handVideo: function() { uni.navigateTo({ - url: '/pages/common/operationVideo/index?id=' + this.formData.id, + url: '/pages/common/operationVideo/index?id=' + this.device.id, success(ev) { } diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue index 05f5992..435ebb3 100644 --- a/pages/6155/deviceDetail.vue +++ b/pages/6155/deviceDetail.vue @@ -649,7 +649,7 @@ proParam: function() { uni.navigateTo({ - url: '/pages/common/productDes/index?id=' + this.formData.id, + url: '/pages/common/productDes/index?id=' + this.device.id, success(ev) { } @@ -657,7 +657,7 @@ }, handRemark: function() { uni.navigateTo({ - url: '/pages/common/operatingInstruct/index?id=' + this.formData.id, + url: '/pages/common/operatingInstruct/index?id=' + this.device.id, success(ev) { } @@ -665,7 +665,7 @@ }, handVideo: function() { uni.navigateTo({ - url: '/pages/common/operationVideo/index?id=' + this.formData.id, + url: '/pages/common/operationVideo/index?id=' + this.device.id, success(ev) { } diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue index 924123d..780e97a 100644 --- a/pages/7305/BJQ7305.vue +++ b/pages/7305/BJQ7305.vue @@ -590,7 +590,7 @@ these.Status.apiType = data.apiType; proParam: function() { uni.navigateTo({ - url: '/pages/common/productDes/index?id=' + this.formData.id, + url: '/pages/common/productDes/index?id=' + this.device.id, success(ev) { } @@ -598,7 +598,7 @@ these.Status.apiType = data.apiType; }, handRemark: function() { uni.navigateTo({ - url: '/pages/common/operatingInstruct/index?id=' + this.formData.id, + url: '/pages/common/operatingInstruct/index?id=' + this.device.id, success(ev) { } @@ -606,7 +606,7 @@ these.Status.apiType = data.apiType; }, handVideo: function() { uni.navigateTo({ - url: '/pages/common/operationVideo/index?id=' + this.formData.id, + url: '/pages/common/operationVideo/index?id=' + this.device.id, success(ev) { } -- 2.43.5 From 7cbdc00ae0d896613ea8b5b774571ee6fd806a25 Mon Sep 17 00:00:00 2001 From: liub Date: Thu, 5 Feb 2026 10:15:11 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E5=B0=81=E8=A3=85Msg?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=89=AB=E7=A0=81=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=AD=E8=BD=AC=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/MessagePopup/MessagePopup.vue | 2 +- components/MsgBox/MsgBox.vue | 187 +++++++++++ config/index.js | 2 +- pages.json | 8 + pages/100/HBY100.vue | 4 +- pages/6107/BJQ6107.vue | 2 +- pages/common/addScan/ScanEquip.vue | 396 +++++++++++++++++++++++ pages/common/index/index.vue | 97 +++--- static/images/common/scan.png | Bin 286 -> 2417 bytes static/images/common/warning.png | Bin 0 -> 1483 bytes utils/BleHelper.js | 8 +- utils/MsgPops.js | 162 ++++++++++ utils/request.js | 2 +- 13 files changed, 813 insertions(+), 57 deletions(-) create mode 100644 components/MsgBox/MsgBox.vue create mode 100644 pages/common/addScan/ScanEquip.vue create mode 100644 static/images/common/warning.png create mode 100644 utils/MsgPops.js diff --git a/components/MessagePopup/MessagePopup.vue b/components/MessagePopup/MessagePopup.vue index 46291b3..8f3a628 100644 --- a/components/MessagePopup/MessagePopup.vue +++ b/components/MessagePopup/MessagePopup.vue @@ -48,7 +48,7 @@ {{ buttonCancelText?buttonCancelText:'取消' }} diff --git a/components/MsgBox/MsgBox.vue b/components/MsgBox/MsgBox.vue new file mode 100644 index 0000000..77e99f1 --- /dev/null +++ b/components/MsgBox/MsgBox.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/config/index.js b/config/index.js index d239f4a..6ec3377 100644 --- a/config/index.js +++ b/config/index.js @@ -2,7 +2,7 @@ const config = { // 开发环境 development: { - BASE_URL: 'http://192.168.110.172:8000',//http://139.224.253.23:8000 + BASE_URL: 'http://192.168.110.57:8000',//http://139.224.253.23:8000 API_PREFIX: '', // MQTT 配置 MQTT_HOST: 'www.cnxhyc.com', diff --git a/pages.json b/pages.json index 8ee4097..9b578b8 100644 --- a/pages.json +++ b/pages.json @@ -414,6 +414,14 @@ { "navigationBarTitleText" : "录制语音" } + }, + { + "path" : "pages/common/addScan/ScanEquip", + "style" : + { + "navigationBarTitleText" : "扫码", + "navigationStyle": "custom" + } } diff --git a/pages/100/HBY100.vue b/pages/100/HBY100.vue index eff28dd..824c995 100644 --- a/pages/100/HBY100.vue +++ b/pages/100/HBY100.vue @@ -736,7 +736,7 @@ for (let i = 0; i < header.length; i++) { dataView.setUint8(i, header[i]); } - console.log("curr=" + curr + "orderNo=", orderNo); + // console.log("curr=" + curr + "orderNo=", orderNo); dataView.setUint8(14, '0x' + orderNo.substring(0, 2)); dataView.setUint8(15, '0x' + orderNo.substring(2, 4)); @@ -764,7 +764,7 @@ }); } - console.log("发送成功," + curr + "/" + total); + // console.log("发送成功," + curr + "/" + total); this.Status.curr = curr; curr++; diff --git a/pages/6107/BJQ6107.vue b/pages/6107/BJQ6107.vue index d8995ed..ce0f426 100644 --- a/pages/6107/BJQ6107.vue +++ b/pages/6107/BJQ6107.vue @@ -976,7 +976,7 @@ buttonBgColor: "#BBE600" }, warn: { - icoUrl: '/static/images/6170/svg.png', + icoUrl: '/static/images/common/warning.png', borderColor: "#FFC84E", buttonBgColor: "#FFC84E", } diff --git a/pages/common/addScan/ScanEquip.vue b/pages/common/addScan/ScanEquip.vue new file mode 100644 index 0000000..dbfbe51 --- /dev/null +++ b/pages/common/addScan/ScanEquip.vue @@ -0,0 +1,396 @@ + + + + + \ No newline at end of file diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue index c97172c..52b40f7 100644 --- a/pages/common/index/index.vue +++ b/pages/common/index/index.vue @@ -497,54 +497,57 @@ import BleReceive from '@/utils/BleReceive'; switch (item.action) { case 'scan': // 扫一扫 - uni.scanCode({ - autoDecodeCharset:true, - autoZoom:true, - barCodeInput:true, - success: (res) => { - console.log('条码内容:', res); - // 清除之前的数据 - this.previousScanResult = null; - // 处理新的扫码结果 - const cleanedResult = res.result.trim(); - console.log('扫码结果:', cleanedResult); - let url = - `/pages/common/qrcode/qrcode?deviceId=${encodeURIComponent(cleanedResult)}`; - try { - let json = JSON.parse(cleanedResult); - if ('imei' in json) { - url = - `/pages/common/qrcode/qrcode?deviceId=${encodeURIComponent(json.imei)}`; - } else if ('blue' in json || 'ble' in json) { - if(json.ble){ - json.blue=json.ble; - } - if(json.blue){ - if (!json.blue.includes(':')) { - json.blue = json.blue.replace( - /(.{2})/g, '$1:') - .slice(0, -1) - } - } - - url =`/pages/common/addBLE/LinkBle?mac=${encodeURIComponent(json.blue)}`; - } - } catch (ex) { - - } - // 跳转并传递扫描结果 - uni.navigateTo({ - url: url - }); - }, - fail: (err) => { - console.log('扫码失败', err); - uni.showToast({ - title: '扫码失败', - icon: 'none' - }); - } + uni.navigateTo({ + url:'/pages/common/addScan/ScanEquip' }); + // uni.scanCode({ + // autoDecodeCharset:true, + // autoZoom:true, + // barCodeInput:true, + // success: (res) => { + // console.log('条码内容:', res); + // // 清除之前的数据 + // this.previousScanResult = null; + // // 处理新的扫码结果 + // const cleanedResult = res.result.trim(); + // console.log('扫码结果:', cleanedResult); + // let url = + // `/pages/common/qrcode/qrcode?deviceId=${encodeURIComponent(cleanedResult)}`; + // try { + // let json = JSON.parse(cleanedResult); + // if ('imei' in json) { + // url = + // `/pages/common/qrcode/qrcode?deviceId=${encodeURIComponent(json.imei)}`; + // } else if ('blue' in json || 'ble' in json) { + // if(json.ble){ + // json.blue=json.ble; + // } + // if(json.blue){ + // if (!json.blue.includes(':')) { + // json.blue = json.blue.replace( + // /(.{2})/g, '$1:') + // .slice(0, -1) + // } + // } + + // url =`/pages/common/addBLE/LinkBle?mac=${encodeURIComponent(json.blue)}`; + // } + // } catch (ex) { + + // } + // // 跳转并传递扫描结果 + // uni.navigateTo({ + // url: url + // }); + // }, + // fail: (err) => { + // console.log('扫码失败', err); + // uni.showToast({ + // title: '扫码失败', + // icon: 'none' + // }); + // } + // }); break; case 'bluetooth': uni.navigateTo({ diff --git a/static/images/common/scan.png b/static/images/common/scan.png index 93e40fe1ba8d047947119561bdf68d5a12407b3b..591d48f4c7bbfec6f0b7468a0015a517773f380e 100644 GIT binary patch literal 2417 zcmeAS@N?(olHy`uVBq!ia0vp^2Y`4p2OE&QpCz2Zz`$wY>Eakt!T9z8;{+AYNh+Q~ z-K%Eqc6V_}OG^t21%h%A_3%uZI5T{(CF-&$J_J*Vo&=Km6HgkHG#aasTZ<=b7)C zc>dX{)&InQZQcDtw=+8af7QMA=dBQb<$bozFHxRv-E5#g;$K{U_h`FHUM-4u&wk%?vA4!7JoYOvOzs}d_q_A#*Y(eK zHu^`nKdvtSSTg&47ujwv0(;<<>>iT? z()W(Uf8HYiH1WUqBcQwgJApzcz60ol|J;Q@b@hrs)Bfup0lN8r>keSZ>>pJ;8XD9| z8~h(`s>%J{ar|2Qyof7nU-O?TSh+rUrD^!;S%F#G4X4U@Z9VpCWk~j_u#oLxfmZ^= zrd;jvI-QlOy4bC7rjd4$YOG^uk>k20t1pZ0To&W0RkSshldDX1<%&=r-xZU%0}8L1 zi0t-m|i4|jT-zx)uvm5{!fGa*} zJl=Qk)rng-8?R10%2(ojM6ATSTQ@>KP*==Bmm@*r8k+&jErzxY45y?vHYE0XMKG8O z91zIh>uF^0QfN@hmbsS1W}Lvo62NwZ=a}Hxs(xEbPMedyL-P#|M7z3*O9+G^0JQhhuhl?W^}!CkPW(>&~lUBY9I``kKwhUEv3`tGR|yw9cc?x;W8uk;5; znf@P*pU}|w#I<>clLM>O0;Yq&qUHUh11voUSZ35qKI&qyO5pqA@DNxSm3t;IgdJc| z`EPVYlu7FXv#bE9aMI)SIl$oK@JZh}M$y560jzzB0~6bs{X8G%fXb=&X>ldPv;b@U z@pbplbvb{|0n6=jNImpQwq|Qn^!*2H`(_P_dS)D z*5T;SP8@PNAMYY+?K*M!t7ka>u^QR`Z8QIP9hkm=HRsOm?Z@_*{1^Io9jyQJBY8&6 XHor@SO&u}7rWAvxtDnm{r-UW|6E0*x literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r63?ysp-_HY5`~f~8u0Z-f66kljmjM)FEeY}q zW|*nwTfE7l8Kh;Wr;B5V$MLt<&hj=J@USK@OD^b7W2m!YP+;@8^|ySLNAIeADnaYl z{<$mDRO6B3-m`L+GGBKaU+4Xnl8Tq6aSO!)zdT%3$fCPKOzXv=j>`vTzQ63~7i?6V zw_MZ6@M%T%1@DU;-MN1{d;K2wJm%iXAGED=qS>ND#iC)XRt>A3{=VY&?AAov9medM zS!>?@z3s-X@2br-{dJhstnF*K9Gh#O8=h&t8$8GNZr`<+D<|079eUn>&ua6^Y9=-@ WRlDNb@0fs|VDNPHb6Mw<&;$UgnR!$I diff --git a/static/images/common/warning.png b/static/images/common/warning.png new file mode 100644 index 0000000000000000000000000000000000000000..fd4fce98fbf24909039b718ef7e0c6e2c67eed3b GIT binary patch literal 1483 zcmV;+1vL7JP)V3(S77&i|UDd>+@PnA4)6KjNeH__7d6GSL!If6%RNU zNKc;)M6w}KBvw&lkswybuP5RVCju4K@--WXmXU~r;+9kt@A)a1xTq?HSw&AzPH`g< zIlz2!i;dLrn^$;iSQDsdxS75rI^?lKR3d?TX{)hY5$LXJF0gIl%tkeBBv8?7z7$mx z@wkPkSoYP6O?uPX0^N!8mgtbjEk?}{>FK&6ttHUB-(;@|L-{dCB?z9a)0Y(1ih1Q^ z?+HWsu}Ebh;Wqw4^7za5d<%RoKEmr^Z|wUxtw zV&nE(923=||B52f#m3Y=H7jbhK+}^OTqrJRv69iCM`CRSTOp;29^s8B%!t!bn=>J? z2ww{W72^h&8!D=~Tp-s;wOHz@poC0&gl^FCC%Fv8fKi~k=KPV+DO8a0{oli2X`Ea3 zgNLRgh%rGA(`$|n9?>9EsepwdWTChrbW6!JGYd35xxk%bZqdP01WKd=1nMKuTSC{o zqN306_b3s__O7*r1}ho;XGE6ggpN@&cGgD(_b3s_!<^5lXpRdIXiS#R37ta)t?04x z4TrndRT`{h2$YazkI+4ap13NIzd4_C%cwoXmqImv#2sMnG4w=}Ktlw&B=kec@|xpo zyYVlEV~0T?Urq52!>BD_u=)(vTS7k=7LD!&s35#s~ZZND~-$Nyj$nu=f4O)Fr zPbQ(1P$Q7zy~tJww7Lgdrdpt)S?iSOfw-V^fz&51>JJD?sT3&3>77jH0+ruIEvOYJ zha?j|*(0<|mjY?I;@y3zp_xFg4zOJc)bRh48VQu+WU6&0Q2o?e&{&`x&S)`ifZ3rN zfhL@}B77s-2~@0VSt9mM`Y9=3Rp?MeLb1a&M~c4bNKuBuT2YAfS!#}Z8uxCJHos|Fp002ovPDHLkV1oFWtAYRk literal 0 HcmV?d00001 diff --git a/utils/BleHelper.js b/utils/BleHelper.js index 49fcec1..8f35d96 100644 --- a/utils/BleHelper.js +++ b/utils/BleHelper.js @@ -784,18 +784,18 @@ class BleHelper { if (this.cfg.receivDataCallback.length > 0) { - // console.log("有人订阅消息") + console.log("有人订阅消息") this.cfg.receivDataCallback.forEach(( rec) => { - // console.log("有人订阅消息111", ) + console.log("有人订阅消息111", ) if (rec.callback) { try { - // console.log("正在处理订阅消息",rec); + console.log("正在处理订阅消息",rec); rec.callback(recData, f, rec.key, this.cfg .receivDataCallback ); - // console.log("处理订阅消息完毕"); + console.log("处理订阅消息完毕"); } catch (err) { console.error( "订阅消息出现异常", diff --git a/utils/MsgPops.js b/utils/MsgPops.js new file mode 100644 index 0000000..295ba05 --- /dev/null +++ b/utils/MsgPops.js @@ -0,0 +1,162 @@ +var MsgType = { + error: "error", + succ: "succ", + warn: "warn" +} +var time = null; +// 显示成功 +export const MsgSuccess = (msg, btnTxt, ev) => { + + if (!ev) { + + return null; + } + if (!ev.$refs.msgPop) { + + return null; + } + let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.succ); + + createClear(ev); + return option; +} +//显示失败 +export const MsgError = (msg, btnTxt, ev) => { + + if (!ev) { + + return null; + } + if (!ev.$refs.msgPop) { + + return null; + } + + let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.error); + createClear(ev); + return option; +} +//显示警告 +export const MsgWarning = (msg, btnTxt, ev, isClear) => { + if (!ev) { + + return null; + } + if (!ev.$refs.msgPop) { + + return null; + } + let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.warn); + if (isClear === undefined || isClear) { + createClear(ev); + } + + return option; + + +} + + +// 隐藏loading +export const MsgClose = (options, ev) => { + + + if (!ev) { + + return; + } + if (!ev.$refs.msgPop) { + + return; + } + if (typeof(options) == 'string') { + options = { + key: options + } + } + ev.$refs.msgPop.closePop(options); + +} + + + +export const showPop = (options, ev, isClear) => { + + + if (!ev) { + + return null; + } + if (!ev.$refs.msgPop) { + + return null; + } + let option = ev.$refs.msgPop.showPop(options); + + if (isClear === undefined || isClear) { + createClear(ev); + } + + return option; +} + +const createClear = (ev) => { + let cnt = getPops(ev); + if (cnt >= 5) { + clearTimeout(time); + time = setTimeout(() => { + let key = new Date().getTime(); + showPop({ + key: key, + message: "消息太多, 是否全部关闭", + iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", + borderColor: "#e034344d", + buttonBgColor: "#E03434", + buttonText: '全部关闭', + buttonTextColor: '#232323de', + showCancel: true, + buttonCancelText: "取消", + cancelCallback: () => { + + MsgClose(key, ev); + }, + okCallback: function() { + + MsgClear(ev); + } + + }, ev, false); + }, 500); + + + } +} + +//获取当前弹窗数量 +export const getPops = (ev) => { + if (!ev) { + + return null; + } + if (!ev.$refs.msgPop) { + + return null; + } + return ev.$refs.msgPop.getPops(); + +} + + +//清空所有弹窗 +export const MsgClear = (ev) => { + if (!ev) { + + return null; + } + if (!ev.$refs.msgPop) { + + return null; + } + return ev.$refs.msgPop.clearPops(); + +} \ No newline at end of file diff --git a/utils/request.js b/utils/request.js index c56423a..1ac57fc 100644 --- a/utils/request.js +++ b/utils/request.js @@ -1,5 +1,5 @@ import config from '../config/index.js'; -export const env = 'development'; //production development //开发of线上 改这里就行 +export const env = 'production'; //production development //开发of线上 改这里就行 const BASE = config[env]; const request = (options) => { console.log("options" + JSON.stringify(options), BASE.BASE_URL) -- 2.43.5 From 8f211750b0460795350e705a912d42ecd0679eb0 Mon Sep 17 00:00:00 2001 From: liub Date: Sat, 7 Feb 2026 13:52:40 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=8E=E6=88=91?= =?UTF-8?q?=E7=9A=84=E5=88=86=E4=BA=AB=E8=BF=9B=E5=85=A5=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E9=A1=B5=E6=9C=89=E6=9D=83=E9=99=90=E9=AA=8C=E8=AF=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/common/allShare/index.vue | 2 +- pages/common/audioManager/AudioList.vue | 24 ++++++++++++------------ pages/common/shareDevices/index.vue | 13 +++++++++++++ 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/pages/common/allShare/index.vue b/pages/common/allShare/index.vue index 5da6725..02ff8d3 100644 --- a/pages/common/allShare/index.vue +++ b/pages/common/allShare/index.vue @@ -147,7 +147,7 @@ // 页面跳转成功后的回调函数 res.eventChannel.emit('detailData', { data: item, - apiType: 'listB' // 自定义标识 // 自定义标识,详情哪里根据这个参数不同信息 + apiType:this.activeTab===0?'listA':'listB' // 自定义标识 // 自定义标识,详情哪里根据这个参数不同信息 }); } }) diff --git a/pages/common/audioManager/AudioList.vue b/pages/common/audioManager/AudioList.vue index 883141f..1015b47 100644 --- a/pages/common/audioManager/AudioList.vue +++ b/pages/common/audioManager/AudioList.vue @@ -91,9 +91,9 @@ - + @@ -216,16 +216,16 @@ statu: "", //状态,是否公开 isApply: "" //是否使用中 - }, - cPlay: { - Id: "", //编号 - name: "", //名称 - createTime: "", //创建时间 - localPath: "", //本地地址 - webPath: "", //网络地址 - statu: "", //状态,是否公开 - isApply: "" //是否使用中 - } + }//, + // cPlay: { + // Id: "", //编号 + // name: "", //名称 + // createTime: "", //创建时间 + // localPath: "", //本地地址 + // webPath: "", //网络地址 + // statu: "", //状态,是否公开 + // isApply: "" //是否使用中 + // } } }, onLoad() { diff --git a/pages/common/shareDevices/index.vue b/pages/common/shareDevices/index.vue index a994a7b..55bbeca 100644 --- a/pages/common/shareDevices/index.vue +++ b/pages/common/shareDevices/index.vue @@ -147,6 +147,19 @@ }); return false; } + else{ + let phone= uni.getStorageSync('phone'); + if(phone==phoneNumber){ + uni.showToast({ + title: '手机号不能是自己账号', + icon: 'none', + duration: 1000 + }); + return false; + } + } + + try { await deviceShareCode({ phonenumber: this.phone -- 2.43.5 From 63214ded3be97e042c0c3b397376a26ba69c9157 Mon Sep 17 00:00:00 2001 From: liub Date: Mon, 9 Feb 2026 16:07:03 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=93=9D=E7=89=99?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E5=8A=A8=E7=94=BB=E7=9C=8B=E8=B5=B7=E6=9D=A5?= =?UTF-8?q?=E6=9B=B4=E5=B9=B3=E6=BB=91=EF=BC=8C=E5=AE=89=E5=8D=93=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=9A=90=E7=A7=81=E5=92=8C=E5=8D=8F=E8=AE=AE=E7=9A=84?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- androidPrivacy.json | 2 +- pages/common/addBLE/addEquip.vue | 60 ++++++++++++++++---------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/androidPrivacy.json b/androidPrivacy.json index 6e900af..3e91c29 100644 --- a/androidPrivacy.json +++ b/androidPrivacy.json @@ -2,7 +2,7 @@ "version" : "1", "prompt" : "template", "title" : "服务协议和隐私政策", - "message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", + "message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "buttonAccept" : "同意并接受", "buttonRefuse" : "暂不同意", "hrefLoader" : "system", diff --git a/pages/common/addBLE/addEquip.vue b/pages/common/addBLE/addEquip.vue index 9d89df0..8a8c8f6 100644 --- a/pages/common/addBLE/addEquip.vue +++ b/pages/common/addBLE/addEquip.vue @@ -481,7 +481,10 @@ } plus.android.requestPermissions( - ['android.permission.BLUETOOTH','android.permission.BLUETOOTH_ADMIN','android.permission.ACCESS_FINE_LOCATION','android.permission.ACCESS_COARSE_LOCATION'], + ['android.permission.BLUETOOTH', 'android.permission.BLUETOOTH_ADMIN', + 'android.permission.ACCESS_FINE_LOCATION', + 'android.permission.ACCESS_COARSE_LOCATION' + ], (result) => { if (result.granted && result.granted.length > 0) { console.log('定位权限已授予'); @@ -533,22 +536,24 @@ return; } } - showLoading(these,{text:'正在刷新'}) + showLoading(these, { + text: '正在刷新' + }) let time = null; let startSearch = () => { - - if(time!==null){ - clearTimeout(time); + + if (time !== null) { + clearTimeout(time); } - + time = setTimeout(() => { these.EquipMents = []; these.PairEquip = []; ble.StartSearch().then(result => { - console.log("开始搜索成功",result); - - }).catch(err => { + console.log("开始搜索成功", result); + + }).catch(err => { console.error("开始搜索失败:", err); if (err.code === 10001) { these.showOpenSetting(); @@ -557,9 +562,9 @@ title: '提示', content: '出现错误:' + err.msg }); - + } - }).finally(()=>{ + }).finally(() => { hideLoading(these); }); }, 200); @@ -905,11 +910,11 @@ position: absolute; border-radius: 50%; background-color: #bbe60033; - animation: expand 4s infinite ease-out; + display: inline-block; transform: translate(-50%, -50%); border: 1rpx solid #bbe6003d; - animation: expand 5s infinite ease-in-out; + animation: expand 4s infinite ease-in-out; } .circle:nth-child(2) { @@ -922,23 +927,18 @@ @keyframes expand { 0% { - width: 0; - height: 0; - opacity: 0.8; - } - - 80% { - width: 18.75rem; - height: 18.75rem; - opacity: 0.2; - } - - 100% { - - width: 0.5rem; - height: 0.5rem; - opacity: 0.5; - } + width: 0; + height: 0; + opacity: 0.9; + } + + + + 100% { + width: 18rem; + height: 18rem; + opacity: 0; + } } .mainContent { -- 2.43.5 From fc88bd6f7dbcd18f709bfd09e400e30d269e137c Mon Sep 17 00:00:00 2001 From: liub Date: Tue, 10 Feb 2026 15:45:45 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E5=B0=8F=E4=BC=98?= =?UTF-8?q?=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 -- 2.43.5 From 27097fecc4a64dcf151d0a23dde3e5fc74998f15 Mon Sep 17 00:00:00 2001 From: liub Date: Fri, 13 Feb 2026 11:50:30 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E5=9C=A8?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E9=A1=B5=E6=97=B6=E6=94=B6=E5=88=B0=E8=93=9D?= =?UTF-8?q?=E7=89=99=E6=B6=88=E6=81=AF=EF=BC=8C=E8=BF=9B=E5=85=A5=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=A1=B5=E5=90=8E=E6=9C=AA=E5=90=8C=E6=AD=A5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/BleHelper.js | 10 +++++----- utils/BleReceive.js | 21 ++++++++------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/utils/BleHelper.js b/utils/BleHelper.js index 7c9d6dc..c127d69 100644 --- a/utils/BleHelper.js +++ b/utils/BleHelper.js @@ -779,23 +779,23 @@ class BleHelper { str: str, hexs: hexs }; - console.log("监听到特征值:" + JSON.stringify(recData)); + // console.log("监听到特征值:",recData); if (this.cfg.receivDataCallback) { if (this.cfg.receivDataCallback.length > 0) { - console.log("有人订阅消息") + // console.log("有人订阅消息") this.cfg.receivDataCallback.forEach(( rec) => { - console.log("有人订阅消息111", ) + // console.log("有人订阅消息111", ) if (rec.callback) { try { - console.log("正在处理订阅消息",rec); + // console.log("正在处理订阅消息",rec); rec.callback(recData, f, rec.key, this.cfg .receivDataCallback ); - console.log("处理订阅消息完毕"); + // console.log("处理订阅消息完毕"); } catch (err) { console.error( "订阅消息出现异常", diff --git a/utils/BleReceive.js b/utils/BleReceive.js index b31a44b..5a75818 100644 --- a/utils/BleReceive.js +++ b/utils/BleReceive.js @@ -49,20 +49,20 @@ class BleReceive { let handler = null; let keys = Object.keys(this.HandlerMap); let devKey = f.device.detailPageUrl ? f.device.detailPageUrl.replace(/\//g, '').toLowerCase() : ''; - // console.log("查找handler - detailPageUrl:", f.device.detailPageUrl, "转换后:", devKey); + for (let index = 0; index < keys.length; index++) { let devKey = f.device.detailPageUrl ? f.device.detailPageUrl.replace(/\//g, "").toLowerCase() : ''; let key = keys[index].replace(/\//g, '').toLowerCase(); if (key == devKey) { handler = this.HandlerMap[keys[index]]; - // console.log("找到匹配的handler:", keys[index]); + break; } } if (handler) { - let data = handler(receive, f, path, recArr); - // console.log("设备"+f.device.deviceName+"收到消息,数据:", data); + let data = handler(receive, f, path, recArr); + this.setBleFormData(data, f); return data; } else { console.error("已收到消息,但无指定处理程序, deviceUrl:", f.device.detailPageUrl, "可用handlers:", keys); @@ -159,7 +159,7 @@ class BleReceive { formData.modeCurr = modeCurr; formData.warnLevel = warn; formData.iswarn = iswarn; - this.setBleFormData(formData, f); + let recCnt = recArr.find(v => { return v.key.replace(/\//g, "").toLowerCase() == f.device.detailPageUrl @@ -208,7 +208,7 @@ class BleReceive { if (str.indexOf('mac address:') == 0) { let formData = {}; formData.macAddress = str.split(':')[1]; - this.setBleFormData(formData, f); + return formData; } else { let receiveData = { @@ -327,7 +327,7 @@ class BleReceive { receiveData.fourGStrenth = fourGStrenth; receiveData.SOS = sosTxt; receiveData.qzwarn = sosTxt === 'sg'; - this.setBleFormData(receiveData, f); + console.log("recArr=", recArr); let recCnt = recArr.find(v => { return v.key.replace(/\//g, "").toLowerCase() == f.device.detailPageUrl @@ -415,8 +415,7 @@ class BleReceive { console.log('将数据转文本失败', ex); } } - // console.log("todo",receiveData); - this.setBleFormData(receiveData, f); + return receiveData; } @@ -503,8 +502,6 @@ class BleReceive { } } - - this.setBleFormData(formData, f); return formData; } catch (error) { console.log('7305数据解析错误:', error); @@ -605,8 +602,6 @@ class BleReceive { } } - - this.setBleFormData(formData, f); return formData; } catch (error) { console.log('7305数据解析错误:', error); -- 2.43.5 From 1aa11a7a38bb86069ef8ea2c9ee3ccaf5fc031f4 Mon Sep 17 00:00:00 2001 From: liub Date: Fri, 13 Feb 2026 16:42:15 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=93=9D=E7=89=99=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=9D=87=E6=B7=BB=E5=8A=A0=E5=8F=AF=E4=B8=BB=E5=8A=A8=E6=96=AD?= =?UTF-8?q?=E5=BC=80=E8=93=9D=E7=89=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100/HBY100.vue | 52 ++++++++- pages/102/HBY102.vue | 76 ++++++++++--- pages/4877/BJQ4877.vue | 212 ++++++++++++++++++++++-------------- pages/6155/BJQ6155.vue | 59 ++++++++-- pages/6155/deviceDetail.vue | 58 +++++++--- pages/650/HBY650.vue | 63 ++++++++--- pages/670/HBY670.vue | 53 +++++++-- pages/7305/BJQ7305.vue | 64 +++++++---- utils/BleReceive.js | 1 + 9 files changed, 467 insertions(+), 171 deletions(-) diff --git a/pages/100/HBY100.vue b/pages/100/HBY100.vue index 824c995..5e2d73b 100644 --- a/pages/100/HBY100.vue +++ b/pages/100/HBY100.vue @@ -57,9 +57,9 @@ 蓝牙名称 {{device.bluetoothName}} - + 蓝牙状态 - {{formData.bleStatu?'已连接':'未连接'}} + {{getbleStatu}}