From 2a308302cea84bb41cc77f6e975de96b99a49b66 Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Fri, 13 Sep 2024 15:42:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=BA=E8=84=B8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/compontents/FaceCompare.ets | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/entry/src/main/ets/pages/compontents/FaceCompare.ets b/entry/src/main/ets/pages/compontents/FaceCompare.ets index 26cfaf8e..fdf313f9 100644 --- a/entry/src/main/ets/pages/compontents/FaceCompare.ets +++ b/entry/src/main/ets/pages/compontents/FaceCompare.ets @@ -139,6 +139,7 @@ export default struct FaceCompare { .backgroundImageSize({ width: '100%', height: '100%' }) .onClick(() => { this.controller.stop() + clearInterval(this.interval) this.vocObj && this.vocObj.releasePlayer() this.showFaceCompare = !this.showFaceCompare this.showFaceCompareFlag = !this.showFaceCompareFlag @@ -250,6 +251,9 @@ export default struct FaceCompare { } }, 1000) globalThis.udpClient2.setMsgCallBack((val) => { + if(globalThis.statue!=3){ + return + } if (val.id == '48') { if (val.body[13] == '1') { this.showFaceCompareFlag = !this.showFaceCompareFlag @@ -322,7 +326,7 @@ export default struct FaceCompare { } async aboutToDisappear() { - + clearInterval(this.interval) } } From d3e022cba891b9f44d50f5b7233abf4197829485 Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Sat, 14 Sep 2024 09:06:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B7=AE=E5=88=86=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/common/utils/UdpClientByCenter.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/entry/src/main/ets/common/utils/UdpClientByCenter.ts b/entry/src/main/ets/common/utils/UdpClientByCenter.ts index 87156197..c497585d 100644 --- a/entry/src/main/ets/common/utils/UdpClientByCenter.ts +++ b/entry/src/main/ets/common/utils/UdpClientByCenter.ts @@ -353,6 +353,10 @@ export default class UdpClientByCenter { // getUDP(globalThis.context,true) globalThis.title='差分状态异常' globalThis.type='3' + prompt.showToast({ + message: '差分状态异常', + duration: 2000 + }); // AppStorage.SetOrCreate('errorCode', 1); // if(this.errorStep!=1){ // this.errorStep=1 @@ -424,6 +428,10 @@ export default class UdpClientByCenter { lightLineUdp?.send(this.plcUdpError ? arrRedBuffer : (isJudge ? arrGreenBugger : arrBlueBuffer)); if (this.plcUdpError) { num++ + this.writeLog({ + time:dateFormat(new Date()), + PLC: 'plc udp信号丢失', + }) console.log(TAG, 'plc udp信号丢失') if (num == 3) { getUDP(globalThis.context,true)