This commit is contained in:
kong 2023-04-18 21:32:13 +07:00
parent 1dd3c8c4be
commit 06d2d76b49
8 changed files with 56 additions and 9 deletions

View file

@ -66,6 +66,8 @@
Var IDcardStageText = "Enable"
Var load_gif_stage = "Invisible"
Var IDcardTextStatus = "โปรดเสียบบัตรประชาชน \nเพื่อดำเนินการต่อ"
Var LivenessRestartCount = 0
</EventOpen>
<EventActionOk>
@ -224,6 +226,15 @@
Open "ROOT/taobin_project/xml/page_face_compare.xml"
EndIff
If LivenessResult = "fail" Then
Var LivenessRestartCount = LivenessRestartCount + 1
If LivenessRestartCount = 2 Then
Var LivenessRestartCount = 0
LivenessCommand "start"
Var LivenessResult = "-"
EndIf
EndIf
Refresh
TimerReset
</EventTimeout>
@ -269,12 +280,6 @@
</Text>
<Image>
<X> 249 </X>
<Y> 751 </Y>
<Filename> "ROOT/taobin_project/image/liveness/bg1.png" </Filename>
</Image>
; back
<Button>
@ -292,8 +297,14 @@
<Image>
<X> 196 </X>
<Y> 737 </Y>
<Filename> "ROOT/taobin_project/image/liveness/bg_21.png" </Filename>
</Image>
<CameraX>
<X> 120 </X>
<X> 140 </X>
<Y> 781 </Y>
<Name>"usbfront"</Name>
<Width> 800 </Width>
@ -301,6 +312,15 @@
<LivenessParameterWhenOK> "FileName=/mnt/sdcard/camera1.jpg" </LivenessParameterWhenOK>
</CameraX>
<Image>
<X> 351 </X>
<Y> 880 </Y>
<Filename> "ROOT/taobin_project/image/liveness/bg3.png" </Filename>
</Image>
<Image>
<X> 249 </X>
<Y> 751 </Y>
@ -350,7 +370,11 @@
<EventLivenessResult>
DEBUGVAR LivenessResult
If LivenessResult = "pass" Then
SAVELOG "Liveness Result - pass"
Else
SAVELOG "Liveness Result - fail"
EndIf
</EventLivenessResult>
<EventUnitTest1>
@ -367,6 +391,10 @@
Var IDCardData = "DONE"
EventEvaluate "EventIDCard"
</EventUnitTest2>
<EventUnitTest3>
Var LivenessResult = "pass"
EventEvaluate "EventLivenessState"
</EventUnitTest3>
</Popup>