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
4045d9e9
Commit
4045d9e9
authored
Aug 19, 2020
by
姜春辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_yl_test' into 'master'
身份验证界面增加两个配置信息 See merge request
!1
parents
6214e09a
86ebac1e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
6 deletions
+47
-6
Config.xml
...ice/Logic/GS.Terminal.VisitorSelfService.Logic/Config.xml
+8
-1
AuthenticationPageHandler.cs
...isitorSelfService.Logic/Core/AuthenticationPageHandler.cs
+28
-5
LocalSetting.cs
...ogic/GS.Terminal.VisitorSelfService.Logic/LocalSetting.cs
+11
-0
No files found.
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/Config.xml
View file @
4045d9e9
...
...
@@ -5,8 +5,15 @@
<Key
Caption=
"人脸识别阀值"
Name=
"FaceMinValue"
Value=
"0.85"
/>
<Key
Caption=
"心跳端口"
Name=
"HeartPort"
Value=
"16789"
/>
</Dict>
<Dict
Caption=
"识别方式配置"
Name=
"authenticationconfig"
>
<Key
Caption=
"人脸识别"
Name=
"EnableFace"
Value=
"true"
/>
<Key
Caption=
"二代证识别"
Name=
"EnableIdCard"
Value=
"false"
/>
<Key
Caption=
"二维码识别"
Name=
"EnableQRCode"
Value=
"false"
/>
<!--0是人脸识别 1是二代证识别 2是二维码识别-->
<Key
Caption=
"默认识别方式"
Name=
"DefaultAuthMode"
Value=
"1"
/>
</Dict>
</Dictionaries>
<Structures>
<Structures>
<Structure
Caption=
"服务地址配置"
Name=
"ServiceList"
>
<Declare>
<Property
Caption=
"服务描述"
Name=
"Description"
/>
...
...
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/Core/AuthenticationPageHandler.cs
View file @
4045d9e9
...
...
@@ -196,12 +196,13 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
/// <param name="useFace">是否启用人脸认证</param>
/// <param name="useIdCard">是否启用二代证认证</param>
/// <param name="useQRCode">其否启用二维码认证</param>
public
void
BeginAuth
(
AuthenticationSuccessDelegate
successAction
,
IViewModel
exitView
=
null
,
bool
useFace
=
true
,
bool
useIdCard
=
true
,
bool
useQRCode
=
true
)
public
void
BeginAuth
(
AuthenticationSuccessDelegate
successAction
,
IViewModel
exitView
=
null
,
bool
useFace
=
true
,
bool
useIdCard
=
true
,
bool
useQRCode
=
true
)
{
_ExitView
=
exitView
;
VM
.
EnableFace
=
us
eFace
;
VM
.
EnableIdCard
=
us
eIdCard
;
VM
.
EnableQRCode
=
useQRCode
;
VM
.
EnableFace
=
LocalSetting
.
AuthenticationConfig
.
Enabl
eFace
;
VM
.
EnableIdCard
=
LocalSetting
.
AuthenticationConfig
.
Enabl
eIdCard
;
VM
.
EnableQRCode
=
useQRCode
?
LocalSetting
.
AuthenticationConfig
.
EnableQRCode
:
useQRCode
;
_AuthSuccessCallback
=
successAction
;
ShowView
();
}
...
...
@@ -218,10 +219,32 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
private
void
VM_OnNavigateInto
()
{
VM
.
AuthMode
=
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
Face
;
//默认识别方式
VM
.
AuthMode
=
AuthMode
();
Handlers
.
GetHandler
<
HeadHandler
>().
Start
();
}
private
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
AuthMode
()
{
switch
(
LocalSetting
.
AuthenticationConfig
.
DefaultAuthMode
)
{
case
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
Face
:
if
(
LocalSetting
.
AuthenticationConfig
.
EnableFace
)
return
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
Face
;
break
;
case
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
IdCard
:
if
(
LocalSetting
.
AuthenticationConfig
.
EnableIdCard
)
return
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
IdCard
;
break
;
case
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
QRCode
:
if
(
LocalSetting
.
AuthenticationConfig
.
EnableQRCode
)
return
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
QRCode
;
break
;
}
return
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
.
Face
;
}
private
void
VideoOut
(
Mat
mat
)
{
if
(!
LocalSetting
.
AddonDefaultConfig
.
DisableVideoDetect
)
...
...
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/LocalSetting.cs
View file @
4045d9e9
...
...
@@ -14,10 +14,21 @@ namespace GS.Terminal.VisitorSelfService.Logic
AppConfig
=
LocalSettingLoader
.
Load
<
AppConfig
>(
Program
.
_Context
);
ServiceList
=
LocalSettingLoader
.
Load
<
ServiceList
>(
Program
.
_Context
);
AddonDefaultConfig
=
LocalSettingLoader
.
Load
<
AddonDefaultConfig
>(
Program
.
_Context
);
AuthenticationConfig
=
LocalSettingLoader
.
Load
<
AuthenticationConfig
>(
Program
.
_Context
);
}
public
static
AddonDefaultConfig
AddonDefaultConfig
{
get
;
}
public
static
AppConfig
AppConfig
{
get
;
}
public
static
ServiceList
ServiceList
{
get
;
}
public
static
AuthenticationConfig
AuthenticationConfig
{
get
;
}
}
public
class
AuthenticationConfig
:
IDictSetting
{
public
bool
EnableFace
{
get
;
set
;
}
public
bool
EnableIdCard
{
get
;
set
;
}
public
bool
EnableQRCode
{
get
;
set
;
}
public
ViewModels
.
Pages
.
AuthenticationPage
.
AuthenticationMode
DefaultAuthMode
{
get
;
set
;
}
public
string
DictName
=>
"authenticationconfig"
;
}
public
class
AddonDefaultConfig
:
IDictSetting
...
...
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