Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bh_face_counter
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄天晨
bh_face_counter
Commits
d907f077
Commit
d907f077
authored
Jul 11, 2020
by
修福龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复刷脸窗口循环弹出的问题
parent
fa3e195f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
FacePage.js
src/pages/FacePage.js
+11
-8
No files found.
src/pages/FacePage.js
View file @
d907f077
...
...
@@ -173,7 +173,7 @@ class FacePage extends Component {
handleScaleChange
=
async
({
count
})
=>
{
if
(
count
===
-
1
)
{
// 重力感应开始识别
this
.
wechatFace
();
this
.
wechatFace
(
true
);
}
else
if
(
count
===
0
)
{
// 重力感应归零
this
.
leaveC
();
...
...
@@ -183,6 +183,7 @@ class FacePage extends Component {
verifyCodeModal
:
false
,
current
:
1
,
tipsModal
:
false
,
tip
:
''
,
});
}
};
...
...
@@ -234,13 +235,14 @@ class FacePage extends Component {
};
// 微信人脸身份识别
wechatFace
=
async
()
=>
{
if
(
this
.
state
.
orderDetailsModal
)
{
wechatFace
=
async
face
=>
{
const
{
orderDetailsModal
,
tipsModal
}
=
this
.
state
;
if
((
orderDetailsModal
||
tipsModal
)
&&
!
face
)
{
return
;
}
// 出现订单弹窗,不做人脸识别
const
tipText
=
'正在人脸识别,请看向屏幕,靠中间站稳'
;
Speech
.
speak
(
tipText
);
this
.
setState
({
tip
:
tipText
,
tipsModal
:
true
});
//
this.setState({tip: tipText, tipsModal: true});
let
auth
=
(
await
this
.
authinfo
())
||
{};
if
(
auth
.
return_code
===
'SUCCESS'
||
...
...
@@ -392,7 +394,7 @@ class FacePage extends Component {
<
View
style
=
{
styles
.
faceRecogn
}
>
<
Touch
style
=
{
styles
.
faceGif
}
onPress
=
{
this
.
wechatFace
}
onPress
=
{
()
=>
this
.
wechatFace
(
true
)
}
feedback
=
{
false
}
>
<
Image
source
=
{
require
(
'../assets/Vertical/face.gif'
)}
...
...
@@ -420,7 +422,7 @@ class FacePage extends Component {
)}
<
/View
>
<
Touch
onPress
=
{
this
.
wechatFace
}
onPress
=
{
()
=>
this
.
wechatFace
(
true
)
}
style
=
{
styles
.
btnCome
}
feedback
=
{
false
}
>
<
View
style
=
{
styles
.
click
}
>
...
...
@@ -605,6 +607,7 @@ const styles = {
// flex: 0.2,
marginTop
:
'30%'
,
width
:
'100%'
,
height
:
200
,
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
...
...
@@ -616,7 +619,7 @@ const styles = {
backgroundColor
:
'#FC4000'
,
width
:
'70%'
,
// height: '18%',
height
:
200
,
//
height: 200,
justifyContent
:
'center'
,
alignItems
:
'center'
,
marginRight
:
5
,
...
...
@@ -633,7 +636,7 @@ const styles = {
callTouch
:
{
width
:
'30%'
,
// height: '18%',
height
:
200
,
//
height: 200,
marginLeft
:
5
,
backgroundColor
:
'#FC4000'
,
},
...
...
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