From c1c7d4491bba58ed412383b479c3631a0e226241 Mon Sep 17 00:00:00 2001 From: liub Date: Thu, 5 Mar 2026 10:06:37 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0102=E8=81=94=E6=9C=BA?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 7 +- App.vue | 4 + .../BottomSlideMenuPlus.vue | 27 +- components/MessagePopup/MessagePopup.vue | 705 ++-- components/MsgBox/MsgBox.vue | 170 +- components/TextToHex/TextToHexV2.vue | 291 ++ config/index.js | 2 +- manifest.json | 10 +- pages.json | 7 + pages/100/HBY100.vue | 2 +- pages/100J/HBY100-J.vue | 2 +- pages/4877/BJQ4877.vue | 6 +- pages/4877/BJQ4877V1.vue | 6 +- pages/6075J/BJQ6075J.vue | 2939 +++++++++++++++++ pages/6155/BJQ6155.vue | 19 +- pages/6155/deviceDetail.vue | 18 +- pages/6170/deviceControl/index.vue | 1161 +++++-- pages/6331/BJQ6331.vue | 8 +- pages/650/HBY650.vue | 6 +- pages/670/HBY670.vue | 8 +- pages/7305/BJQ7305.vue | 27 +- pages/common/index/index.vue | 2 +- pages/common/productDes/index.vue | 5 +- static/images/6331/jieN.png | Bin 1524 -> 0 bytes static/images/6331/jieNActive.png | Bin 2099 -> 0 bytes static/images/common/jig.png | Bin 0 -> 2733 bytes static/images/common/jigA.png | Bin 0 -> 2549 bytes static/images/common/sg.png | Bin 0 -> 1256 bytes static/images/common/sgActive.png | Bin 0 -> 1674 bytes static/images/lightImg/closeLight.png | Bin 0 -> 1099 bytes .../{6155/DeviceDetail => lightImg}/fan.png | Bin static/images/{670 => lightImg}/jieN.png | Bin .../images/{670 => lightImg}/jieNActive.png | Bin .../{6155/DeviceDetail => lightImg}/qiang.png | Bin .../{6155/DeviceDetail => lightImg}/ruo.png | Bin .../{6155/DeviceDetail => lightImg}/shan.png | Bin static/images/lightImg/sos.png | Bin 0 -> 793 bytes static/images/lightImg/super.png | Bin 0 -> 897 bytes static/images/lightImg/warn.png | Bin 0 -> 1154 bytes static/images/lightImg/work.png | Bin 0 -> 813 bytes utils/BleHelper.js | 2 +- utils/Common.js | 12 +- utils/mqtt.js | 31 +- 43 files changed, 4732 insertions(+), 745 deletions(-) create mode 100644 components/TextToHex/TextToHexV2.vue create mode 100644 pages/6075J/BJQ6075J.vue delete mode 100644 static/images/6331/jieN.png delete mode 100644 static/images/6331/jieNActive.png create mode 100644 static/images/common/jig.png create mode 100644 static/images/common/jigA.png create mode 100644 static/images/common/sg.png create mode 100644 static/images/common/sgActive.png create mode 100644 static/images/lightImg/closeLight.png rename static/images/{6155/DeviceDetail => lightImg}/fan.png (100%) rename static/images/{670 => lightImg}/jieN.png (100%) rename static/images/{670 => lightImg}/jieNActive.png (100%) rename static/images/{6155/DeviceDetail => lightImg}/qiang.png (100%) rename static/images/{6155/DeviceDetail => lightImg}/ruo.png (100%) rename static/images/{6155/DeviceDetail => lightImg}/shan.png (100%) create mode 100644 static/images/lightImg/sos.png create mode 100644 static/images/lightImg/super.png create mode 100644 static/images/lightImg/warn.png create mode 100644 static/images/lightImg/work.png diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 7181f97..95fb682 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -2,12 +2,12 @@ "version" : "1.0", "configurations" : [ { - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-ios" }, { "customPlaygroundType" : "local", - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-android" }, { @@ -17,6 +17,9 @@ "default" : { "launchtype" : "local" }, + "h5" : { + "launchtype" : "local" + }, "provider" : "aliyun", "type" : "uniCloud" } diff --git a/App.vue b/App.vue index d01ee49..02cee52 100644 --- a/App.vue +++ b/App.vue @@ -212,4 +212,8 @@ font-family: "PingFangBold"; src: url("~@/static/fonts/PingFangBold.ttf") format("opentype"); } + @font-face { + font-family: "SongTi"; + src: url("~@/static/fonts/SongTi.ttf") format("opentype"); + } \ No newline at end of file diff --git a/components/BottomSlideMenuPlus/BottomSlideMenuPlus.vue b/components/BottomSlideMenuPlus/BottomSlideMenuPlus.vue index 22ffa0e..dc38f7b 100644 --- a/components/BottomSlideMenuPlus/BottomSlideMenuPlus.vue +++ b/components/BottomSlideMenuPlus/BottomSlideMenuPlus.vue @@ -15,7 +15,7 @@ - - - + + - {{headerTxt}} - - x - - - - {{ message }} - - - - - - - - {{ promptTitle || '请输入信息' }} - - - - - - {{ buttonCancelText?buttonCancelText:'取消' }} - - + {{headerTxt}} + + x + + + + {{ message }} + + + + + + + + {{ promptTitle || '请输入信息' }} + + + + + + {{ buttonCancelText?buttonCancelText:'取消' }} + + {{ buttonText }} - - - - - - - - + }" @click="handleButtonClick">{{ buttonText }} + + + + + + + + \ No newline at end of file diff --git a/components/MsgBox/MsgBox.vue b/components/MsgBox/MsgBox.vue index 77e99f1..8cefd65 100644 --- a/components/MsgBox/MsgBox.vue +++ b/components/MsgBox/MsgBox.vue @@ -1,57 +1,66 @@ - diff --git a/static/images/6331/jieN.png b/static/images/6331/jieN.png deleted file mode 100644 index 71d371da3af1c49a2dccf38e403e0dcc360a6451..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1524 zcmchXZ%i9y9LMh}P%M91H-!YpKUYSwDa{58V;~Js)*T=$BKF0$mMo;sSS@BFEke0= zh`@-zu2~jDXe3=sW?}&iEK<2T8`&nTv2Pfucm=jKxKyr`m7`qm@k)Im(^n?*mppeb z?)QAZzwhVnp6*lC(ga=#4}zcs$i@F$=mdU~{O67?Yl8>hb2Y8MurA*VL(bPD?mQ^E^ zx?wwtd}OPHX0%H=Fv_K^<{o;!l+GX1aj5uuBRW*(_6yHGz!R78Zto@}A3_I-Ya2Rx zzJ%=wUAG-(-p@gT66SFRGkBj#Vp4@V0ca9{H&kdGNW_Y}!0|3{U;^(zxk$PlO|_$Y zUBoTC-OOK(XsV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ex&=^5gekbAlCcKUEfSBAOd*;zBsJ;d>5Z4|dV*_n0&{cvgH4#| z%kU_MLC!Ua(o+A+Tl^b@v*9tqHT~@uo3J z(97N-YzP)J-VAjId-0cuB!o4XMr{K@J(`7k7O6}TEA9hBy3$_vdM#=q>z^her57cgT+*HNABHk|okAENJ$N6{;EZ6cL zQWGZn_1Tsw5Z?tleBp`DKz5Wb=8`*zCnB)SEW`d(o$N<-hD{`6!Wlq3VG4N$8!q_1 zfC0tg#Vng9unLL*ID-G}w#83(y z`>&Wth{weF|BMMpQ!GyGft}bH!J6uDhyVl2BhBP)K#u=m+*IZFP*A{FSOs1!bP2wX z(-uQKfU*;3F}5Yx=a>&?0E7xM5Jn!?H)Y2JfsVo0({CR(&p*$hpr}XL>9s|Rh!%<~ zgNCtP`Av$Ch1VgwCS}|&@O`8ZyC5sXo;tx)(X}{j)l)c&A*^v0^F+LN(Q&X@=m>vf zK$^mdz#tGc+9=9Fvx78_IsA`<(R&2=Q?v2@#Al>2S{f@&9krhgVbaO8>7&-qn! zBV?3J$nN6hRx2Ti+%_4T{wi{jTkg{f|7gyb+xKkoT>D5-QDI?hxBn*VTj)o4wUWN> zkmL{f*Ox{M|^HMo_Wu0${|2s=n!5l1 literal 0 HcmV?d00001 diff --git a/static/images/common/jigA.png b/static/images/common/jigA.png new file mode 100644 index 0000000000000000000000000000000000000000..09fed8d9e8d7ecc4cdcff6e7bd9fb57ca3719fd4 GIT binary patch literal 2549 zcmcJR`&Uy}7RPS@19BZ4GFQaX=!PnegZBYyc})6#&r^gPELlqq@~5j$DVGGmiu??O-tsT;_;F? z;Ff!<_#1J%~4S0qi>R>?-59aFyO?d`=kC(`b? zR@do9P!xT8LgO&(LMVrX<2R%!DJi-@^=4P}++_IgN>JaSQr*>P}R?Q(1-!Nt;*HlLHyRD+l3n$K00Uwp9^N$_oQHf$KOj9^mZ^MORkmLZ%O?#g+rkFdXQ zqnSQ2d@fHGlw?IXH}4^~$flArh~cuYv1-nK4pt+16@Zi81~NkKd+y za%D6=2BTW~1`~dRROlM4OwP%Gq?vy&axGI@*UhS(vxiI|J7maGD|(q=Xmkp<5vA@k zDq)I6bI%(7aB9w{k&6#+5)%#k{U1_=r&ut*DhFAfxR~9g^-uB2oi)Yd1PpBlWCXLmODucyNvaKhHBf>|BQ05Y6^7 z4e4w?EZ5=n&JGkFpCK_8Ao#ta2y=^e;sg5XsjKcdonvHYb$22;X{{~d@xzFyBZRG|%{}?O%N-x5#@LTp1}@RB^@CO>30r(8 zIU}h$`$i}NAP=h68p$?``@c8 zR?gHYywPfo@UjtCrK*F6f%?A}tRjU_!!dvRT;6M2WD!QueCDQ)Uj|-lRIp#IPmr0X4SjFX+qihoCh^#@BwH28`BtM;XNkKQm|K)pl8^5E zAs>`)@C=qq%UTS4LFx&n&t9si4Rc<%+|C10om;p0X-!$_{jmEB6|t{(h?-^%ZPXkR z3?coRnCTd(&s%e?Ob)7L*s3y18UGs!kFl-@OKJ5E5BFi&Zz!CQMsd?effE_5&q#Q1 ziKnCUXHidpYKOC|D-fD(UCff8gP} zf+w8!um?rz9M^6RTHOIL1pK;{crvvzZ1L} zb6#Fvx6WY@1~o?=_Pm{NmWWom3VMit>h=1hoA4gxZiWEU(})LkEIa_V>Z-9FiEfFSd5)-*W#CIs&z& literal 0 HcmV?d00001 diff --git a/static/images/common/sg.png b/static/images/common/sg.png new file mode 100644 index 0000000000000000000000000000000000000000..6d8bf65c36b7d20b4913261aaa1ad73b58400aa0 GIT binary patch literal 1256 zcmcIke@qis9KY+e6kAF&J68~~Vo<|?bqd-wTw0jrM>kiP8`KRcO`NUEaBT+CLxJ|} zqEXyxSSDdOYIMeIS)iFoyJ(^3GGvpvZT2mkMzy!Vp# zec$)_e7@iBduM8Nl_J4L0RR9ZZIxy}vlg=>HHDc+kgQn%;0|gvWv?UPd>A~RtL@I! zuJ8Jy_hzL=V=|fQY8kV!miXcSuom`ey`DuenJOwY@89g}72x|!dfPFZtr}+`_gzMw z^9t`l8&Z?zmyDbg?FZ()@JC0%=1Wm~4|qVk%K9*MDNc)=O%~`DEy@dyk^$&v)onWayTzT!SgF?)chBZvdXCv)0f${Q%x*V# zuMdG%8Ld1&e~5}ct_y#Rcoo2-h?@UZ$2n<(*#ES3 zhgB;7#KJS2F`t0Ks^nn>py1e{H2)DM#D8QObAdi!U3($XK#dJ&Ad-Ot&>*j%ZEBKF zR&8+v9X6nj8hdhda|)G<&r~|(yzK^0y+fWd01k`DrwkrJ`&L2+U-R+$?*!5q8C{Pg zs4b#gQ4(>iJlUZG8q@tSKC_Ihw+Tjm!e>)Cnvw$3mWcB|MM5hPfbLeDE}zwsAfr`zA0hK@-s8QerQYY+2-? zqx!edw1S}(5;F<{ArWQ+6oe&l6%!LNmUJlAjQV~JnPrH?=(d-#qFd#b^seT*3C>Gi#!Si`?+1h_@1K6ir|YkJm(>TuCE(560`T9Y7Ga+f)2% zx|OX#$K-kvHh6HL^BK|@-iu5n(-8Zrl5Iqr-x%Zjvxpni*ct~lO0I#BMgC*drNinW zxsa=e(~#Qap$Q@NEZ(}A>6Fi3<=XT$JJqcsV65miu~9C5r0tkcM&%*Uh?phYs4It1bJf%iQ5!JAyyr~T*jo! z&b|w}gsoEuU44DROHuk%nOEo;p+$U-X9zf+v}NTM@{IM^_8KzuIe5Cep#OWXLwRo@ xFa~^?n^_7=gS_8S0hcb?_B`nP?DqAzD`&2>;Ofw+SD7CS(3a~o11}m+{sU${njZiF literal 0 HcmV?d00001 diff --git a/static/images/common/sgActive.png b/static/images/common/sgActive.png new file mode 100644 index 0000000000000000000000000000000000000000..17a1d797bde45364d54b00d579e72c3861dd5194 GIT binary patch literal 1674 zcmcIlYfzF|7{(hUd0BN+t5q~>O4nU>?ZP-<=n7ueN~>+1$pnjuN=;h3fEIjYtyq?t zZJNubnQX2#-YUgL0t~H89n`GV^#W>2mI?#{A|EV{wEftA?4NyS&Ua?cyx;RY@4U}> z&xN=hk&f_Ha0mqA7#)S%W!^U}u4Pd3w~e;?9Rvd18I243fo3%$wJKN}UAQ*dHTO#CPzfz&Ns75;NorMcj(~ZSw>e;HcTM9vU^21c5rs=7dwYw0(e||Tx#w)wj)TZYn(u@_@y>BBW zqh8NDLS~L67!ZnX)>d^WS76S{-v4GEdsDs;7E9}^Xl$;omYSGKsn1+r@#%*ogXCN%D+I zarX9eniqdSz~S{Pr43EQNfP^nhbh>CSN2B~)`sVfq6qY9C1mIAR7p~#vfK_ zApI#)U&lO}Z*ptofHBaAS-CfJu5;geWOyw7VKMqiu8*{*(0CnI$fw_!_g@h~V4i24 z?B&}0Ndhv?QDk=4Z?f@cTr>+RNFyz2(z9hxQlYq1ospgHUii}2*l{{doiy1Goa^SWbK`7B-=*dQWYkUWT zQqwOo7C;3;fs>^lju+K&1M*>MDr&oAb6+MTPTCbnzan)v+BFLNM|VT?NB&Aq)Q;S% ztyd3sF;n)ip`Goi>F zaJl2i<$o~Hw!FI>%4@qiu+5&>xuTZ9DU;dN1A-Q|io#klFTi3_uc%?pVvVaW z$dtO5vcUz%k>CC$s~)IpVOcL~L|W%54gCU%v}>MgF`yt^*!;adf&dvr{Hi!-RTemP zHDmv@grb-<3|c%P@s%d7qx+ewo{U0R^H!Q%7qqK+!KPD|_EDG7;-e+c0Nej^Omlg; zf0>vp&jtgE;7nFCCTOG0QaKdVVuD5;<*X3`Hf6=(`t>M<_|j&Ybuv8_F@!LZ(K zC{5Q(1`xhvi=5@Xr=@J literal 0 HcmV?d00001 diff --git a/static/images/lightImg/closeLight.png b/static/images/lightImg/closeLight.png new file mode 100644 index 0000000000000000000000000000000000000000..506ea9b26c0649149e500bca9666f59efcc39a3e GIT binary patch literal 1099 zcmeAS@N?(olHy`uVBq!ia0vp^N+8U^1|+TAxeqZgun2j&IEGX(zJ0(rLB(^DilaP0T~@04zeXJ&CSiFW%ulvT<3k#!plp`%l*%Ttn^v* zBR}PLX@lpb_nrUMw%N=52v}F4|MC8TZ^xPCPi@}2|A&6s@5hb&PjBuEyfnT0dD8EV z2ag>XTQ(~=Re1POD$lw zo09(9%`^VoX2p3YzujhxKUTkHJ)_kF=gMvQQ@%X4Q9ojQv(Ea#=^y={O&!>4G|qqP zowRSx^VSNr+xhG@lK%~1CJX)u^Q^YfhbjLKH~WFq19g?Zoaebe`fR(;_rvI4EnLeE zwuFZt$)KVrl8NJ;>cwVFxlo?19?6{itr(&0G=gS^nXWVjRP5b4GiPJ4cFt z!Gaa&^|zJVtQ*RwmazXfI>Md!TkQdR=^PBG&?uA~G-IF2k zp9vgYA7CMUfT==$-sS5azogYLyFkKYWY%XtAzB=lttzm0DhXt0SKiVJ3s3GR`Dk z`DJ#+Ma6mDNM^pRya;tAC^hnflhA?62gX0H|CI8KKitg+Oc$UO4o zI<5g`j%Pey!tccm{g2|G3#U|@RS>Eakt!T9z8;{+AYNh+Q~ z-K%Eqc6V_}OG^t21%h%A_&(rZ=QsBR_!oPHfKj#~8N>te8>}UKC@vr!A%M$AyOdo4*{HuJh z@z3)rU(fOa)<-`#{JnmF@BhxYs7rF;3iG<(%05{C^ZZuzmrEmx zJ0^?2nc6VB;-H-R%d-%fvIEmU9@@Ke$?=a&H~xt|;H@}V=X;6$V@}8Oq~D7h`X9Ac zXL?reVc1qLzN1t8&2E)ix$|umdfWE%R9MGtIPO_h9LI4x{uuZ7)syOa)17U^Z`?Z)#*q`VAereLT3crr@O?#Cy z`|H_n=d;&H>fex^6gT;KYlYhFdZ-r~Ec<`2LW!dd?E_=aq`{PJa8%FrV>{ z;r}voM)QwNz@Ybk02WSXcz?Kl-TBF1Vr}$~7~lM7^x*A}^Isi-K>#)m6a@cmst;s) z-FggG4-A7p&v!8YVDYR!^tl~m;qm%D>xSdrw;r=PEVGqqlC|V>uu9ke*z|X N22WQ%mvv4FO#m$Prf>iN literal 0 HcmV?d00001 diff --git a/static/images/lightImg/super.png b/static/images/lightImg/super.png new file mode 100644 index 0000000000000000000000000000000000000000..0167f90e3a61cd00258598c673c138cb81715b73 GIT binary patch literal 897 zcmeAS@N?(olHy`uVBq!ia0vp^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JOWf31t#d>h)r2ArHRnSfbiV)RYe8gm9Q!SY%+c^Oyrc~YcO0X;`bY_3WYuCDa zA?nufGonP1;h1bMQEz9`@?EG#ZIRms3*i%M{CJnBzcR>=4LGwO;n5`Dz(v~`g5(iL zZ-MBpoS|?vW`Pcfb_1VsB<>@6F5~TKy{Nw^$VnE3t$gBj^f$&rBefT=r7mP|k0XB; z_+y}#o4->?X(z{^x@pdN`}pi11?)82%ahE-2qPO z5TO-sB^MKRbotrP#?6AI^fY!a{!hAxSQnGbV_5>|J-R8G=>CC%mE1vsM0K{NRjpZ2 z$Sa?G5nHw%4b@YCYYCz&9R3}cuQfDFwYlJOxwEI?e5}|mX;P43IydK@cj%eKncj`@NkeVX=!e5E-kxf&*VDqlNMfHT3+sd9%QA@ zqMZGjA7&mf{quYm|BslP|B@d_{mZ_ie!HG0=5T%Q@08!Zjptd`J+!}Gd*FH3|EP}t zQ7695W}43llwJ3`;r!IM_H64O?mt$$>F;r%A=h{KZ@Vw@!v|3J&0Ak%cvlC04QS4-2c@6*yD!ssauYVc05n2 zX8+;%VB??PHhdM~p4B$ekA800%lt>-L&UuOw(D*@{8=sYVcn!}6@DG!hrUf`%0FLx zi}~Ih?K-&|4=rsWTJ(=_C;pz=ApgknuHs8m#+?6p1;XcF3ak8OIWPaHb;Dn;1N{fYkJQA(dkB=>Vx(QzjBW%UxwTJx$hh){>9>HfADjAg<{Tr zp%2bB%dJ)Rsx`d5&zkqhvbJf-{0Bds_Xuo@=lr2K@3P#7XE7gl+pPDW@I~0B9^^W0 zM*Ab5x3j { //释放连接锁 diff --git a/utils/Common.js b/utils/Common.js index 3570666..f2b829c 100644 --- a/utils/Common.js +++ b/utils/Common.js @@ -218,31 +218,31 @@ export default { value: "1", label: "灯光模式", checked: false, - type: ['6170', '670','102','6155','650','7305'] + type: ['6170', '670','102','6155','650','7305','6075'] }, { value: "2", label: "激光模式", checked: false, - type: ['6170'] + type: ['6170','6075'] }, { value: "3", label: "开机画面", checked: false, - type: ['210', '6170', '670','6155','650','7305'] + type: ['210', '6170', '670','6155','650','7305','6075'] }, { value: "4", label: "人员信息登记", checked: false, - type: ['210', '6170', '670','6155','650','7305'] + type: ['210', '6170', '670','6155','650','7305','6075'] }, { value: "5", label: "发送信息", checked: false, - type: ['210', '6170', '670'] + type: ['210', '6170', '670','6075'] }, { value: "6", @@ -258,7 +258,7 @@ export default { value: "42", label: "SOS", checked: false, - type: ['670','4877'] + type: ['670','4877','6075'] }, { value: "43", diff --git a/utils/mqtt.js b/utils/mqtt.js index 2297fa2..e5554d1 100644 --- a/utils/mqtt.js +++ b/utils/mqtt.js @@ -281,7 +281,36 @@ class MqttClient { } } - publish(topic, message,retained) { + async publish(topic, message,retained) { + let getLan=()=>{ + return new Promise((succ,error)=>{ + uni.getNetworkType({ + success: (res) => { + let networkType = res.networkType; + // 判断网络是否连接 + if (networkType === 'none') { + console.error('无网络连接') + succ(false); + } else { + succ(true); + } + }, + fail: (err) => { + console.error('获取网络状态失败:', err); + + succ(false); + + } + }); + }); + + } + + let flag=await getLan(); + if(!flag){ + + return false; + } if (this.client && this.client.isConnected()) { const mqttMessage = new Paho.Message(message); mqttMessage.destinationName = topic; From 0aa012d9c7225e7d0765103d5b92b5a1b91ef0da Mon Sep 17 00:00:00 2001 From: liub Date: Fri, 6 Mar 2026 10:25:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=9A=90=E7=A7=81?= =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 5 +-- androidPrivacy.json | 2 +- manifest.json | 22 ++++++--- pages/6170/deviceControl/index.vue | 60 ++++++++++++++----------- pages/common/privacyAgreement/index.vue | 12 ++++- 5 files changed, 62 insertions(+), 39 deletions(-) diff --git a/App.vue b/App.vue index 02cee52..faaf989 100644 --- a/App.vue +++ b/App.vue @@ -212,8 +212,5 @@ font-family: "PingFangBold"; src: url("~@/static/fonts/PingFangBold.ttf") format("opentype"); } - @font-face { - font-family: "SongTi"; - src: url("~@/static/fonts/SongTi.ttf") format("opentype"); - } + \ No newline at end of file diff --git a/androidPrivacy.json b/androidPrivacy.json index 3e91c29..f0a3045 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/manifest.json b/manifest.json index 92ca288..985c208 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "appid" : "__UNI__A21EF43", "description" : "设备管控", "versionName" : "1.0.18", - "versionCode" : "100", + "versionCode" : 101, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { @@ -44,7 +44,6 @@ "", "", "", - "", "", "", "", @@ -100,13 +99,22 @@ }, "push" : { "unipush" : { - "version" : "2", "offline" : true, - "honor" : {}, - "mi" : {}, - "vivo" : {}, + "hms" : {}, "oppo" : {}, - "hms" : {} + "vivo" : {}, + "mi" : {}, + "honor" : {}, + "version" : "2", + "icons" : { + "small" : { + "ldpi" : "unpackage/res/icons/18x18.png", + "mdpi" : "unpackage/res/icons/24x24.png", + "hdpi" : "unpackage/res/icons/36x36.png", + "xhdpi" : "unpackage/res/icons/48x48.png", + "xxhdpi" : "unpackage/res/icons/72x72.png" + } + } } } }, diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 5cc86e5..903511c 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -680,7 +680,7 @@ }) } - if (ble) { + if (ble && this.itemInfo.deviceMac) { let f = this.getDevice(); if (f) { let json = { @@ -738,7 +738,7 @@ } - if (ble) { + if (ble && this.itemInfo.deviceMac) { let f = this.getDevice(); if (f) { let json = { @@ -859,7 +859,7 @@ }); } - if (ble) { + if (ble && this.itemInfo.deviceMac) { let f = this.getDevice(); if (f) { let json = { @@ -929,7 +929,7 @@ }) } - if (ble) { + if (ble && this.itemInfo.deviceMac) { let f = this.getDevice(); if (f) { let json = { @@ -1129,12 +1129,12 @@ iconUrl: "/static/images/common/success.png", }, these); - setTimeout(()=>{ + setTimeout(() => { ble.sendString(f.deviceId, "transmit complete", f - .writeServiceId, f - .wirteCharactId); - },1000); - + .writeServiceId, f + .wirteCharactId); + }, 1000); + these.rgb565Data = null; resolve(); return; @@ -1253,7 +1253,7 @@ }); }, 0) } - if (ble) { + if (ble && this.itemInfo.deviceMac) { let f = this.getDevice(); if (f) { bleSend(); @@ -1499,7 +1499,7 @@ }, 0); } - if (ble) { + if (ble && this.itemInfo.deviceMac) { let f = this.getDevice(); if (f) { bleSend(); @@ -1796,8 +1796,7 @@ }, onLoad(options) { these = this; - rec = BleReceive.getBleReceive(); - ble = BleTool.getBleTool(); + const eventChannel = this.getOpenerEventChannel(); // 监听 'detailData' 事件,获取传过来的数据 @@ -1807,6 +1806,8 @@ eventChannel.on('detailData', (data) => { console.log(data, 'data'); this.itemInfo = data.data; + + this.deviceID = data.data.id; this.navTitle = data.data.deviceName; this.apiType = data.apiType @@ -1890,22 +1891,31 @@ this.fetchSharedDeviceDetail(data.data.id) } - let f = ble.data.LinkedList.find((v) => { - if (v.macAddress == this.itemInfo.deviceMac) { - console.log("找到设备了", v); - these.formData.deviceId = v.deviceId; - return true; - } - return false; - }); - if (f) { - these.formData.bleStatu = 'connecting'; - ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { - these.formData.bleStatu = true; + if (this.itemInfo.deviceMac) { + rec = BleReceive.getBleReceive(); + ble = BleTool.getBleTool(); + + let f = ble.data.LinkedList.find((v) => { + if (v.macAddress == this.itemInfo.deviceMac) { + console.log("找到设备了", v); + these.formData.deviceId = v.deviceId; + return true; + } + return false; }); + + if (f) { + these.formData.bleStatu = 'connecting'; + ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then( + res => { + these.formData.bleStatu = true; + }); + } } + + }); eventChannel.emit('ack', { diff --git a/pages/common/privacyAgreement/index.vue b/pages/common/privacyAgreement/index.vue index 0cd534f..7c27108 100644 --- a/pages/common/privacyAgreement/index.vue +++ b/pages/common/privacyAgreement/index.vue @@ -2,7 +2,10 @@ 星汉物联App联隐私政策 - 更新日期:2025-09-23 + 编写日期:2025-09-23 + + + 更新日期:2026-03-05 生效日期:2025-10-08 @@ -38,7 +41,7 @@ (1).账号信息:手机号码、验证码,用于注册、登陆 (2).蓝牙,用于设备连接后的通信、控制 (3).相机/相册权限,拍摄的照片或视频用于上传给设备、扫码等 - (4).设备标识信息:IMEI、Android ID、MAC、OAID、软件安装列表,用于日志查询、统计分析、识别您的设备预防恶意程序及反作弊,提高服务安全性 + (4).设备标识信息:BSSID、Wi-Fi SSID、Wi-Fi BSSID、IMEI、Android ID、MAC、OAID、AAID、PushToken、APP ID、应用包名、软件安装列表,用于日志查询、统计分析、识别您的设备预防恶意程序及反作弊,提高服务安全性 (5).GPS或网络位置,用于基于位置的服务,如地图导航、位置偏移预警 (6).麦克风,我们的智能设备支持播放语音,需要录音以上传给设备 (7).根据SDK功能,可能收集设备信息、位置信息等。我们会对合作的第三方SDK进行严格评估,并要求其遵守相关法规。具体清单见下文。 @@ -51,6 +54,11 @@ (2).定位SDK(com.amap.api.location),所属公司:北京高德图强科技有限公司,隐私政策链接:https://lbs.amap.com/pages/privacy/ (3).移动智能终端补充设备标识体系统一调用SDK(com.bun.miitmdid),所属公司:中国信息通信研究院,隐私政策链接:https://www.msa-alliance.cn/col.jsp?id=122 (4).轻量版地图SDK(com.amap.api.maps.utils),所属公司:北京高德图强科技有限公司,隐私政策链接:https://lbs.amap.com/pages/privacy/ + + (5).个推消息推送(com.igexin.push),所属公司:浙江每日互动网络科技股份有限公司,隐私政策链接:http://docs.getui.com/download.html + (6).阿里云快速json(com.alibaba.fastjson),所属公司:杭州阿里巴巴广告有限公司,隐私政策链接:https://github.com/alibaba/fastjson + (7).vivo PUSH-SDK(com.vivo.push),所属公司:维沃移动通信有限公司,隐私政策链接:https://dev.vivo.com.cn/documentCenter/doc/180 + (8).OPPO PUSH 客户端SDK(com.heytap),所属公司:OPPO广东移动通信有限公司,隐私政策链接:https://open.oppomobile.com/new/introduction?page_name=oppopush 4. 信息的存储与安全 From 1eae2d1d91bbeb45eedea1ef2986e7b8dc6469ea Mon Sep 17 00:00:00 2001 From: liub Date: Mon, 9 Mar 2026 16:10:48 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0100=E3=80=81670=E7=94=B5?= =?UTF-8?q?=E9=87=8F=E4=BD=8E=E7=9A=84=E6=8F=90=E7=A4=BA=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E4=B8=BA=E7=9B=91=E5=90=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/6170/deviceControl.js | 8 +- manifest.json | 5 +- pages/100/HBY100.vue | 94 ++++----- pages/6075J/BJQ6075J.vue | 305 +++++++++++++---------------- pages/670/HBY670.vue | 40 ++-- pages/common/addScan/ScanEquip.vue | 3 +- pages/common/index/index.vue | 3 +- 7 files changed, 214 insertions(+), 244 deletions(-) diff --git a/api/6170/deviceControl.js b/api/6170/deviceControl.js index c517ee5..3fcb147 100644 --- a/api/6170/deviceControl.js +++ b/api/6170/deviceControl.js @@ -63,6 +63,10 @@ export function mapReverseGeocoding(data) { }) } -export function deviceRealTimeStatus(){ - return Promise.resolve({code:500}); +export function deviceRealTimeStatus(params){ + return request({ + url: `/app/device/realTimeStatus`, + method: 'get', + data:params + }) } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 985c208..864842f 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "星汉物联", "appid" : "__UNI__A21EF43", "description" : "设备管控", - "versionName" : "1.0.18", + "versionName" : "1.0.19", "versionCode" : 101, "transformPx" : false, /* 5+App特有相关 */ @@ -114,7 +114,8 @@ "xhdpi" : "unpackage/res/icons/48x48.png", "xxhdpi" : "unpackage/res/icons/72x72.png" } - } + }, + "meizu" : {} } } }, diff --git a/pages/100/HBY100.vue b/pages/100/HBY100.vue index 6a9a8d5..b9cdbf4 100644 --- a/pages/100/HBY100.vue +++ b/pages/100/HBY100.vue @@ -223,11 +223,11 @@ - - + + - + 产品信息 @@ -245,18 +245,18 @@ - + - - - - + - - + +
@@ -518,6 +518,11 @@ recei = BleReceive.getBleReceive(); ble = BleTool.getBleTool(); + this.$watch("formData.sta_battery", (newVal, oldVal) => { + if (newVal <= 20 && this.formData.sta_system==2) { + this.showMsg("设备电量低"); + } + }); ble.addReceiveCallback(this.bleValueNotify, pagePath); ble.addStateBreakCallback(this.bleStateBreak, pagePath); @@ -572,10 +577,10 @@ these.formData.bleStatu = false; these.formData.deviceId = f.deviceId; - these.formData.bleStatu = 'connecting'; + these.formData.bleStatu = 'connecting'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }).catch(ex=>{ + }).catch(ex => { these.formData.bleStatu = 'err'; }); these.setBleFormData(); @@ -592,17 +597,17 @@ this.Status.pageHide = false; }, computed: { - getbleStatu(){ - if(this.formData.bleStatu===true){ + getbleStatu() { + if (this.formData.bleStatu === true) { return '已连接'; } - if(this.formData.bleStatu==='connecting'){ + if (this.formData.bleStatu === 'connecting') { return '连接中'; } - if(this.formData.bleStatu==='dicconnect'){ + if (this.formData.bleStatu === 'dicconnect') { return '正在断开'; } - if(this.formData.bleStatu==='err'){ + if (this.formData.bleStatu === 'err') { return '连接异常'; } return '未连接'; @@ -1196,9 +1201,9 @@ return; } if (res.deviceId == these.formData.deviceId) { - if(res.device){ + if (res.device) { these.formData.bleStatu = 'connecting'; - }else{ + } else { this.formData.bleStatu = false; } setTimeout(() => { @@ -1233,14 +1238,14 @@ showLoading(this, { text: "蓝牙恢复可用,正在连接设备" }); - these.formData.bleStatu='connecting'; + these.formData.bleStatu = 'connecting'; ble.LinkBlue(these.formData.deviceId).then(() => { these.formData.bleStatu = true; updateLoading(these, { text: '连接成功' }); }).catch(ex => { - these.formData.bleStatu='err'; + these.formData.bleStatu = 'err'; updateLoading(these, { text: ex.msg }) @@ -1313,9 +1318,10 @@ } }); - if (this.formData.sta_battery <= 20) { - this.showMsg("设备电量低"); - } + + + + }, getDevice: function() { @@ -1327,32 +1333,32 @@ return f; }, - - bleStatuToggle(){ - let f=this.getDevice(); - if(!f){ + + bleStatuToggle() { + let f = this.getDevice(); + if (!f) { this.showBleUnConnect(); return; } - if(this.formData.bleStatu===true){ - this.formData.bleStatu='dicconnect'; - ble.disconnectDevice(f.deviceId).finally(r=>{ - this.formData.bleStatu=false; + if (this.formData.bleStatu === true) { + this.formData.bleStatu = 'dicconnect'; + ble.disconnectDevice(f.deviceId).finally(r => { + this.formData.bleStatu = false; }); return; } - - if(this.formData.bleStatu===false || this.formData.bleStatu==='err'){ - this.formData.bleStatu='connecting'; + + if (this.formData.bleStatu === false || this.formData.bleStatu === 'err') { + this.formData.bleStatu = 'connecting'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }).catch(ex=>{ + }).catch(ex => { these.formData.bleStatu = 'err'; }); return; } - - + + }, diff --git a/pages/6075J/BJQ6075J.vue b/pages/6075J/BJQ6075J.vue index f6ae01e..20b4efa 100644 --- a/pages/6075J/BJQ6075J.vue +++ b/pages/6075J/BJQ6075J.vue @@ -411,7 +411,8 @@ staPowerTime: null, staPowerPercent: null, staDetectResult: null - } + }, + inteval:50 } }, computed: { @@ -994,179 +995,146 @@ } let f = this.getDevice(); - // 处理像素数据并发送 - var processAndSendImageData = function(pixels) { - return new Promise((resolve, reject) => { - // 创建RGB565格式的像素数据 - const arr = Common.convertToRGB565(pixels, 'bgr'); - - var list = []; - let index = 0; // 用于追踪arr的当前位置 - let packetSize = 2048; - let cSize = 248; - // 外层循环:7个主要元素(i从1到7) - for (let i = 1; i < 8; i++) { - let secondLevel = []; - let secondCnt = 0; - // 中层循环:每个主要元素包含9个子数组(j从1到9) - for (let j = 1; j < 10; j++) { - // 确定当前子数组的长度:前8个是254,第9个是64 - - let thirdLevel = []; - - // 从arr中提取相应数量的元素 - for (let k = 0; k < cSize && index < arr.length; k++) { - - if (secondCnt == packetSize) { - break; - } - thirdLevel.push(arr[index]); - secondCnt++; - index++; - } - - secondLevel.push(thirdLevel); - } - list.push(secondLevel); - } - - console.log("list=", list); - - let length = 0; - for (let i = 0; i < list.length; i++) { - const item = list[i]; - let clength = 0; - for (let j = 0; j < item.length; j++) { - const element = item[j]; - console.log("第" + i + "包,第" + j + "小包,长度:" + element.length) - length += element.length; - clength += element.length; - - - } - } - // 分包发送 - sendImagePackets(list).then(resolve).catch(reject); - }); - } - - - - // 分包发送图片数据 - var sendImagePackets = function(imageData) { + + + var sendImagePackets = function(ReSendNo) { + return new Promise((resolve, reject) => { + // 总数据包数 - const totalPackets = 7; + let totalPackets = 52; let currentPacket = 1; - let childPacket = 1; - let totalChildPacket = 9; - - - // 发送单个数据包 - const sendNextPacket = () => { - if (currentPacket > totalPackets) { - setTimeout(() => { + + if (ReSendNo) { + totalPackets = ReSendNo; + currentPacket = ReSendNo; + } + + if (f) { + // 发送单个数据包 + const sendNextPacket = () => { + if (currentPacket > totalPackets) { hideLoading(these); - - MsgSuccess("上传成功", "确定", these); - - + these.closeAction(); + these.showPop({ + showPop: true, + message: "上传成功", + iconUrl: "/static/images/common/success.png", + }); + + setTimeout(()=>{ + ble.sendString(f.deviceId, "transmit complete", f.writeServiceId, f + .wirteCharactId); + },1000); + + these.rgb565Data = null; resolve(); - }, 3000) - + return; + } + + // 计算当前包的数据 + let packetSize = 250; + // if (currentPacket <= 51) { + // packetSize = 250; // 前51个包每个500字节 + // } else { + // packetSize = 50; // 最后一个包100字节 + // } + + // 创建数据包 + const startIndex = (currentPacket - 1) * packetSize; + const endIndex = Math.min(startIndex + packetSize, these.rgb565Data + .length); + if (startIndex > endIndex) { + return; + } + const packetData = these.rgb565Data.slice(startIndex, + endIndex); + // 构建数据包 + const bufferSize = 505; // 5 + packetData.length * 2; // 头部5字节 + 数据部分 + const buffer = new ArrayBuffer(bufferSize); + const dataView = new DataView(buffer); + + // 填充头部 + dataView.setUint8(0, 0x55); // 帧头 + dataView.setUint8(1, 0x02); // 帧类型:开机画面 + dataView.setUint8(2, '0x' + currentPacket.toString(16).padStart(2, + '0')); // 包序号 + + + 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++) { + dataView.setUint16(5 + i * 2, packetData[i], false); // 大端字节序 + } + + if (currentPacket > 51) { //第52包补FF + for (var i = 105; i < bufferSize; i++) { + dataView.setUint8(i, 0xFF); + } + } + + + + //发送数据包 + ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, + 10) + .then(() => { + + + updateLoading(these, { + text: "正在发送:" + currentPacket + "/" + + totalPackets + }) + currentPacket++; + + setTimeout(sendNextPacket, these.inteval); + }).catch(err => { + console.log("发送数据包失败了" + JSON.stringify(err)); + if (err.code == '10007') { + setTimeout(sendNextPacket, these.inteval); + return; + } + these.closeAction(); + these.showPop({ + message: err.msg, + iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", + borderColor: "#e034344d", + buttonBgColor: "#E03434", + }); + hideLoading(these); + these.rgb565Data = null; + reject(err); + }); + } + + if (ReSendNo) { + sendNextPacket(ReSendNo); return; } - - var packetData = imageData[currentPacket - 1][childPacket - 1]; - - let start = 0; - let bufferSize = packetData.length * 2; - - if (currentPacket == 7) { - if (childPacket > 2 && childPacket < 9) { - bufferSize = 496; - } else if (childPacket == 9) { - bufferSize = 128; - } - } - - if (childPacket == 1) { - bufferSize = bufferSize + 8 - start = 8; - } - if (childPacket == 9) { //|| (currentPacket==7 && childPacket==3 - bufferSize = bufferSize + 1 - } - - - //FA 09 10 04 FC 09 [00] [01] + 4096字节+FF 数据格式 - var buffer = new ArrayBuffer(bufferSize); - var dataView = new DataView(buffer); - if (childPacket == 1) { - dataView.setUint8(0, 0xFA); // 帧头 - dataView.setUint8(1, 0x09); // 帧头 - dataView.setUint8(2, 0x10); // 帧头 - dataView.setUint8(3, 0x04); // 帧头 - dataView.setUint8(4, 0xFC); // 帧头 - dataView.setUint8(5, 0x09); // 帧头 - - dataView.setUint8(6, 0x00); // 图序号,图片固定0,视频的话要写序号 - dataView.setUint8(7, currentPacket); //子包序号 - } - - for (let i = 0; i < packetData.length; i++) { - dataView.setUint16(start + i * 2, packetData[i], false); //本包数据,大端字节序 - } - console.log("packetData.length=", packetData.length); - console.log("bufferSize=", bufferSize) - if (childPacket == 9) { // || (currentPacket==7 && childPacket==3 - dataView.setUint8(bufferSize - 1, 0xFF); - } - - //发送数据包 - ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, - 30) - .then(() => { - - let curr = childPacket + (currentPacket - 1) * - totalChildPacket; - console.log("第" + currentPacket + "大包,第" + childPacket + - "小包发送完成,总计:" + curr); - updateLoading(these, { - text: "正在发送" + curr + "/63" - - }) - if (childPacket == 9) { - currentPacket++; - childPacket = 1; - } else { - childPacket++; - } - - setTimeout(sendNextPacket, 100); - }).catch(err => { - if (err.code == 10007) { - setTimeout(sendNextPacket, 100); - return; - } - - console.log("发送数据包失败了", err); - - - showPop({ - message: "发送数据包失败了" + err.msg, - iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", - borderColor: "#e034344d", - buttonBgColor: "#E03434", - }); - - hideLoading(these); - reject(err); + // 开始牵手 + ble.sendString(f.deviceId, "picture transmit start", f.writeServiceId, + f.wirteCharactId).then(() => { + setTimeout(sendNextPacket, 120); + + }).catch((err) => { + console.log("握手没有成功"); + these.showPop({ + message: err.msg, + iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", + borderColor: "#e034344d", + buttonBgColor: "#E03434", }); + hideLoading(these); + reject(err); + }); } - // 开始发送数据 - sendNextPacket(); - }); } @@ -1186,10 +1154,11 @@ }); + these.rgb565Data = Common.convertToRGB565(data.piexls); + setTimeout(function() { - processAndSendImageData(data.piexls).catch(( - ex) => { - console.log("出现异常", ex); + sendImagePackets().catch(() => { + }); }, 0) diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index c0d561c..feec97b 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -486,10 +486,14 @@ }, onLoad: function() { - these = this; recei = BleReceive.getBleReceive(); ble = BleTool.getBleTool(); + this.$watch("formData.battary", (newVal, oldVal) => { + if (newVal <= 20 && this.formData.sta_system==2) { + this.showMsg("设备电量低"); + } + }); ble.addReceiveCallback(these.bleValueNotify, pagePath); @@ -928,30 +932,16 @@ // console.log("收到文本回复", payload); // // this.SendTxtMQ(json); // } - if (keys.indexOf('sta_BreakNews') > - - 1) { //紧急通知 - if (json.sta_BreakNews === - 'I get it' - ) // && this.Status.msgOkTime && this.Status.msgOkIntval){ - { - these.showPop({ - showPop: true, - message: "用户已确认收到紧急通知", - iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png" - }); - - // this.Status.msgOkTime=null - // clearInterval(this.Status.msgOkIntval); - - } - - - } - // else { - // console.log("收到不能处理的数据", payload); - // } - - + if (keys.indexOf('sta_BreakNews') > -1) { //紧急通知 + if(json.sta_BreakNews=='I get it'){ + these.showPop({ + showPop: true, + message: "用户已确认收到紧急通知", + iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png" + }); + } + + } } catch (error) { console.error("无法解析此消息", payload); } diff --git a/pages/common/addScan/ScanEquip.vue b/pages/common/addScan/ScanEquip.vue index aa323f8..dc6bb27 100644 --- a/pages/common/addScan/ScanEquip.vue +++ b/pages/common/addScan/ScanEquip.vue @@ -72,7 +72,6 @@ callback: this.scan }], title: '扫码' - }, }, formData: { @@ -208,7 +207,7 @@ this.qrCodeResult(cleanedResult, true, null); }, fail: (err) => { - this.showMsg("扫码失败:" + err.errMsg, MsgType.error); + MsgError("扫码失败:" + err.errMsg,"确定",these); } }); }, diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue index d5e4473..4c7b7b2 100644 --- a/pages/common/index/index.vue +++ b/pages/common/index/index.vue @@ -187,7 +187,8 @@ import BleReceive from '@/utils/BleReceive'; navTitle: "我的设备", deleteShow: false, RenameModel: false, - menuItems: [{ + menuItems: [ + { text: '扫一扫添加', icon: '/static/images/common/scane.png', action: 'scan' From 2be522977cee1036a90f482460b88caaaaf99554 Mon Sep 17 00:00:00 2001 From: liub Date: Tue, 10 Mar 2026 14:07:13 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=8A=A5=E8=AD=A6?= =?UTF-8?q?=E3=80=81=E6=89=B9=E9=87=8F=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E5=88=86=E4=BE=9B=E5=BA=94=E5=95=86=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 84 +- pages.json | 25 +- pages/6075/BJQ6075.vue | 2 +- pages/6075J/BJQ6075J.vue | 2 +- pages/6155/BJQ6155.vue | 2 +- pages/6155/ImgCrop.vue | 100 -- pages/6155/deviceDetail.vue | 2 +- pages/6170/deviceControl/index.vue | 2 +- pages/650/HBY650.vue | 2 +- pages/670/HBY670.vue | 2 +- pages/7305/BJQ7305.vue | 2 +- pages/common/ImgCrop/ImgCrop.vue | 100 ++ pages/{6170 => common}/callPolice/index.vue | 1079 ++++++++++--------- pages/common/index/index.vue | 94 +- pages/common/send/index.vue | 786 ++++++++------ 15 files changed, 1273 insertions(+), 1011 deletions(-) create mode 100644 pages/common/ImgCrop/ImgCrop.vue rename pages/{6170 => common}/callPolice/index.vue (71%) diff --git a/App.vue b/App.vue index faaf989..a21853c 100644 --- a/App.vue +++ b/App.vue @@ -30,43 +30,41 @@ //以上代码仅在开发时使用,否则会出现不可预知的问题。 // #ifdef APP|APP-PLUS - - bleTool.getBleTool(); - - var appid = plus.runtime.appid; - console.log('应用的 appid 为:' + appid); - + if (plus.runtime.isAgreePrivacy()) { + + + bleTool.getBleTool(); - uni.getPushClientId({ - success(res) { - console.log("推送信息:", res); - uni.setStorageSync('push_cid', res.cid); - }, - fail(err) { - console.error(err) + uni.getPushClientId({ + success(res) { + console.log("推送信息:", res); + uni.setStorageSync('push_cid', res.cid); + }, + fail(err) { + console.error(err) + } + }); + if (!uni.setAppBadgeNumber) { //兼容鸿蒙的写法 + uni.setAppBadgeNumber = plus.runtime.setBadgeNumber; } - }); - if(!uni.setAppBadgeNumber){//兼容鸿蒙的写法 - uni.setAppBadgeNumber=plus.runtime.setBadgeNumber; - } - uni.onPushMessage((res) => { - console.log("收到推送消息:", res); //监听推送消息 - if(res.type=='click'){ - //将App角标设置为0,清空app在消息中心的所有消息 - uni.setAppBadgeNumber(0); - plus.push.clear(); - return; - } - uni.createPushMessage({ - title: res.data.title, - content: res.data.content, - payload:res.data.payload + uni.onPushMessage((res) => { + console.log("收到推送消息:", res); //监听推送消息 + if (res.type == 'click') { + //将App角标设置为0,清空app在消息中心的所有消息 + uni.setAppBadgeNumber(0); + plus.push.clear(); + return; + } + uni.createPushMessage({ + title: res.data.title, + content: res.data.content, + payload: res.data.payload + }); + }); - }); - - + } // #endif }, @@ -74,18 +72,15 @@ console.log('App Show'); //将检查更新换到onshow,因为苹果用户喜欢一直挂着 - uni.getSystemInfo({ - success: function(res) { - if (res.uniPlatform == 'app') { - - let appid = plus.runtime.appid; - if (appid !== 'HBuilder') { - console.log("appid=", appid); - upgrade.checkAndUpdateWgt(); - } - } - } - }); + // #ifdef APP|APP-PLUS + + let appid = plus.runtime.appid; + console.log("appid=", appid); + + if (appid !== 'HBuilder') { + upgrade.checkAndUpdateWgt(); + } + // #endif }, onHide: function() { console.log('App Hide'); @@ -212,5 +207,4 @@ font-family: "PingFangBold"; src: url("~@/static/fonts/PingFangBold.ttf") format("opentype"); } - \ No newline at end of file diff --git a/pages.json b/pages.json index 8bc5df7..64d3058 100644 --- a/pages.json +++ b/pages.json @@ -52,8 +52,7 @@ { "path": "pages/common/send/index", "style": { - "navigationBarTitleText": "发送信息", - "enablePullDownRefresh": true + "navigationBarTitleText": "发送信息" } }, { @@ -102,10 +101,9 @@ } }, { - "path": "pages/6170/callPolice/index", + "path": "pages/common/callPolice/index", "style": { - "navigationBarTitleText": "报警", - "enablePullDownRefresh": true + "navigationBarTitleText": "报警" } }, @@ -160,14 +158,7 @@ "navigationStyle": "custom" } }, - { - "path": "pages/6155/ImgCrop", - "style": { - "navigationBarTitleText": "图像裁剪", - "navigationStyle": "custom", - "fullscreen": true - } - }, + { "path": "pages/6075/BJQ6075", "style": { @@ -447,6 +438,14 @@ { "navigationStyle": "custom" } + }, + { + "path": "pages/common/ImgCrop/ImgCrop", + "style": { + "navigationBarTitleText": "图像裁剪", + "navigationStyle": "custom", + "fullscreen": true + } } ], diff --git a/pages/6075/BJQ6075.vue b/pages/6075/BJQ6075.vue index a61429b..3e4d8dc 100644 --- a/pages/6075/BJQ6075.vue +++ b/pages/6075/BJQ6075.vue @@ -679,7 +679,7 @@ } let that = this; uni.navigateTo({ - url: "/pages/6155/ImgCrop", + url: "/pages/ImgCrop/ImgCrop", events: { ImgCutOverPath: function(data) { that.selectedImage = data.picPath; diff --git a/pages/6075J/BJQ6075J.vue b/pages/6075J/BJQ6075J.vue index 20b4efa..8115957 100644 --- a/pages/6075J/BJQ6075J.vue +++ b/pages/6075J/BJQ6075J.vue @@ -1145,7 +1145,7 @@ sourceType: ['album'], success: function(res) { uni.navigateTo({ - url: "/pages/6155/ImgCrop", + url: "/pages/ImgCrop/ImgCrop", events: { ImgCutOver: function(data) { diff --git a/pages/6155/BJQ6155.vue b/pages/6155/BJQ6155.vue index 8cc8ad8..72f80b0 100644 --- a/pages/6155/BJQ6155.vue +++ b/pages/6155/BJQ6155.vue @@ -909,7 +909,7 @@ sourceType: ['album'], success: function(res) { uni.navigateTo({ - url: "/pages/6155/ImgCrop", + url: "/pages/ImgCrop/ImgCrop", events: { ImgCutOver: function(data) { diff --git a/pages/6155/ImgCrop.vue b/pages/6155/ImgCrop.vue index c6209ea..e69de29 100644 --- a/pages/6155/ImgCrop.vue +++ b/pages/6155/ImgCrop.vue @@ -1,100 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue index 714ed14..1170edb 100644 --- a/pages/6155/deviceDetail.vue +++ b/pages/6155/deviceDetail.vue @@ -926,7 +926,7 @@ sourceType: ['album'], success: function(res) { uni.navigateTo({ - url: "/pages/6155/ImgCrop", + url: "/pages/ImgCrop/ImgCrop", events: { ImgCutOver: function(data) { diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 903511c..c18438c 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -979,7 +979,7 @@ } let that = this; uni.navigateTo({ - url: "/pages/6155/ImgCrop", + url: "/pages/ImgCrop/ImgCrop", events: { ImgCutOver: function(data) { that.selectedImage = data.picPath; diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue index eadbee2..6742974 100644 --- a/pages/650/HBY650.vue +++ b/pages/650/HBY650.vue @@ -1051,7 +1051,7 @@ import request, { baseURL } from '@/utils/request.js'; var gotoCutImg = (imgPath) => { uni.navigateTo({ - url: "/pages/6155/ImgCrop", + url: "/pages/ImgCrop/ImgCrop", events: { ImgCutOver: function(data) { // console.log("我收到裁剪后的图片了,感谢老铁," + data) diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index feec97b..91addfe 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -1871,7 +1871,7 @@ var gotoCutImg = (imgPath) => { uni.navigateTo({ - url: "/pages/6155/ImgCrop", + url: "/pages/ImgCrop/ImgCrop", events: { ImgCutOver: function(data) { // console.log("我收到裁剪后的图片了,感谢老铁," + data) diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue index d7021ca..0daf510 100644 --- a/pages/7305/BJQ7305.vue +++ b/pages/7305/BJQ7305.vue @@ -783,7 +783,7 @@ sourceType: ['album'], success: function(res) { uni.navigateTo({ - url: "/pages/6155/ImgCrop", + url: "/pages/ImgCrop/ImgCrop", events: { ImgCutOver: function(data) { //将8位的二进制数组转换成16进制数据 diff --git a/pages/common/ImgCrop/ImgCrop.vue b/pages/common/ImgCrop/ImgCrop.vue new file mode 100644 index 0000000..0f68d84 --- /dev/null +++ b/pages/common/ImgCrop/ImgCrop.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/pages/6170/callPolice/index.vue b/pages/common/callPolice/index.vue similarity index 71% rename from pages/6170/callPolice/index.vue rename to pages/common/callPolice/index.vue index 0f3dec1..7a11efb 100644 --- a/pages/6170/callPolice/index.vue +++ b/pages/common/callPolice/index.vue @@ -1,497 +1,584 @@ - - - - - \ No newline at end of file diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue index 4c7b7b2..d384bde 100644 --- a/pages/common/index/index.vue +++ b/pages/common/index/index.vue @@ -18,13 +18,16 @@
- - - + 报警 + 位置 + 发送信息 + + + @@ -40,15 +43,15 @@ 设备:{{item.deviceName}} - ID:{{item.deviceImei}} + + ID:{{item.deviceImei}} ID:{{item.deviceMac}} - 在线 + 在线 - 离线 + 离线 电量:{{item.battery || '0'}}% @@ -74,7 +77,7 @@ 暂无数据 --> - + @@ -116,7 +119,7 @@ - + {{ item.text }} @@ -146,17 +149,34 @@ } from '@/api/common/index.js' import bleTool from '@/utils/BleHelper.js'; import MescrollUni from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue' -import BleReceive from '@/utils/BleReceive'; + import BleReceive from '@/utils/BleReceive'; var pagePath = 'pages/common/index'; var ble = null; var timeout = null; - var recei=null; + var recei = null; export default { components: { MescrollUni }, - + computed:{ + showSendFlex(){ + // return this.activeTab && this.activeTab.id !== ''&& (this.activeTabInfo.communicationMode==0 || this.activeTabInfo.communicationMode==2); + if(this.showMap || this.ShowSendmessage || this.showWarn){ + return true; + } + return false; + }, + ShowSendmessage(){ + return this.dic.showMsgTypes.indexOf(this.activeTabInfo.typeName)>-1 + }, + showMap(){ + return this.dic.showMapTypes.indexOf(this.activeTabInfo.typeName)>-1 + }, + showWarn(){ + return this.dic.showCallPolice.indexOf(this.activeTabInfo.typeName)>-1 + } + }, data() { return { mescroll: null, @@ -187,8 +207,7 @@ import BleReceive from '@/utils/BleReceive'; navTitle: "我的设备", deleteShow: false, RenameModel: false, - menuItems: [ - { + menuItems: [{ text: '扫一扫添加', icon: '/static/images/common/scane.png', action: 'scan' @@ -233,7 +252,12 @@ import BleReceive from '@/utils/BleReceive'; deviceId: '', deviceName: "", //重命名 - activeTabInfo: '' + activeTabInfo: '', + dic: { + showMsgTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'BJQ6075J'],//需要发送消息的类型 + showMapTypes:['BJQ6170','HBY210','HBY670','BJQ6075','HBY018A','HBY100-J','BJQ6075J','HBY008A','HBY100-Y'],//需要显示地图的类型 + showCallPolice:['BJQ6170','HBY210','HBY670','BJQ6075','HBY018A','HBY100-J','BJQ6075J','HBY008A','HBY100-Y']//需要发送报警的类型 + } } }, methods: { @@ -254,7 +278,7 @@ import BleReceive from '@/utils/BleReceive'; // 下拉刷新 downCallback() { - + if (this.mescroll) { this.mescroll.resetUpScroll(false); this.mescroll.scrollTo(0, 0); @@ -266,7 +290,7 @@ import BleReceive from '@/utils/BleReceive'; // 上拉加载 upCallback() { - + this.getData(); }, @@ -387,7 +411,7 @@ import BleReceive from '@/utils/BleReceive'; if (res.code == 200) { //console.log("deviceTypeList=" + JSON.stringify(res.data)); this.tabs = [{ - id: '', + id: '', name: '全部设备', typeName: '全部设备' }, @@ -412,7 +436,7 @@ import BleReceive from '@/utils/BleReceive'; getData() { var task = () => { - + return new Promise((resolve, reject) => { let data = { pageNum: this.mescroll.num, @@ -496,9 +520,9 @@ import BleReceive from '@/utils/BleReceive'; case 'scan': // 扫一扫 uni.navigateTo({ - url:'/pages/common/addScan/ScanEquip' + url: '/pages/common/addScan/ScanEquip' }); - + break; case 'bluetooth': uni.navigateTo({ @@ -619,7 +643,7 @@ import BleReceive from '@/utils/BleReceive'; const deviceType = currentTab.id || ''; console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`); uni.navigateTo({ - url: '/pages/6170/callPolice/index', + url: '/pages/common/callPolice/index', events: { ack: function(data) {} }, @@ -666,7 +690,7 @@ import BleReceive from '@/utils/BleReceive'; // 列表跳转 handleFile(item) { let url = item.detailPageUrl; - // url="/pages/6075/BJQ6075L"; + // url="/pages/6075/BJQ6075L"; // if(!url){ // url="/pages/6075/BJQ6075" // } @@ -715,7 +739,7 @@ import BleReceive from '@/utils/BleReceive'; }, }, onShow() { - + if (ble) { //因为vue视图只能后退不能隐藏后再显示 //所以回到首页后将其他所有页面的订阅都删除 @@ -723,12 +747,12 @@ import BleReceive from '@/utils/BleReceive'; } }, onLoad() { - + // console.error("首页加载"); this.getTab() this.downCallback(); - - + + // 绑定页面做了监听,新增成功,刷新页面 uni.$on('refreshDeviceList', () => { this.getTab() // 刷新数据 @@ -771,9 +795,9 @@ import BleReceive from '@/utils/BleReceive'; recei.ReceiveData(receive, device, path, recArr); this.updateBleStatu(); }, pagePath); - - let phone=uni.getStorageSync("phone"); - if(phone==='17671332251'){//先写死方便自己使用,后面按人员权限区分 + + let phone = uni.getStorageSync("phone"); + if (phone === '17671332251') { //先写死方便自己使用,后面按人员权限区分 this.menuItems.push({ text: '上报设备', icon: '/static/images/common/add.png', diff --git a/pages/common/send/index.vue b/pages/common/send/index.vue index f064c70..bd4d85c 100644 --- a/pages/common/send/index.vue +++ b/pages/common/send/index.vue @@ -1,11 +1,12 @@