Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
G
GS.Terminal.VisitorSelfService
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
终端组
GS.Terminal.VisitorSelfService
Commits
815cf0a6
Commit
815cf0a6
authored
Apr 11, 2021
by
姜春辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化WebSocket验脸连接过程
parent
e3e93781
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
Config.xml
...ice/Logic/GS.Terminal.VisitorSelfService.Logic/Config.xml
+1
-1
AuthenticationPageHandler.cs
...isitorSelfService.Logic/Core/AuthenticationPageHandler.cs
+13
-3
No files found.
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/Config.xml
View file @
815cf0a6
...
...
@@ -4,7 +4,7 @@
<Dict
Caption=
"基础配置"
Name=
"defaultconfig"
>
<Key
Caption=
"人脸识别阀值"
Name=
"FaceMinValue"
Value=
"0.85"
/>
<Key
Caption=
"心跳端口"
Name=
"HeartPort"
Value=
"18083"
/>
<Key
Caption=
"远程认证地址"
Name=
"FaceWebSocket"
Value=
"ws://192.168.1.7:
5012
/face/sdk2?persontype=访客"
/>
<Key
Caption=
"远程认证地址"
Name=
"FaceWebSocket"
Value=
"ws://192.168.1.7:
15056
/face/sdk2?persontype=访客"
/>
</Dict>
<Dict
Caption=
"识别方式配置"
Name=
"authenticationconfig"
>
<Key
Caption=
"人脸识别"
Name=
"EnableFace"
Value=
"true"
/>
...
...
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/Core/AuthenticationPageHandler.cs
View file @
815cf0a6
...
...
@@ -119,7 +119,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
private
void
_faceWebSocket_Error
(
object
sender
,
SuperSocket
.
ClientEngine
.
ErrorEventArgs
e
)
{
Program
.
_Context
.
Logger
.
Error
(
$"WebSocket远程验脸连接错误"
,
e
.
Exception
);
}
private
void
_faceWebSocket_Closed
(
object
sender
,
EventArgs
e
)
...
...
@@ -135,8 +135,16 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
private
void
VM_OnAuthModeChanged
(
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
nowMode
)
{
if
(
nowMode
==
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
Face
)
{
try
{
_faceWebSocket
.
Open
();
}
catch
(
Exception
ex
)
{
Program
.
_Context
.
Logger
.
Error
(
$"远程认证服务异常"
,
ex
);
MainShell
.
ShowPrompt
(
"远程认证服务异常"
);
}
ThirdAddon
.
FaceRecognization
.
RegistOutPutMatEvent
(
VideoOut
);
ThirdAddon
.
FastRecognization
.
Restart
(
_FaceEngineId
);
_faceValidating
=
false
;
...
...
@@ -183,10 +191,12 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
if
(!
_faceValidating
)
{
if
(
fid
==
_fid
)
{
if
(
result
==
1
)
_faceWebSocket
.
Send
(
_currentFeature
,
0
,
_currentFeature
.
Length
);
else
MainShell
.
ShowPrompt
(
$"活体检测失败"
);
MainShell
.
ShowPrompt
(
$"面部识别失败,正在重试..."
);
}
}
}
/// <summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment