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
d008286e
Commit
d008286e
authored
Jun 29, 2020
by
zeven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容随行付接口刷脸进店
parent
9a9a22da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
admin.js
src/models/admin.js
+0
-1
FacePage.js
src/pages/FacePage.js
+15
-6
No files found.
src/models/admin.js
View file @
d008286e
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
axios
from
'axios'
;
import
axios
from
'axios'
;
import
*
as
api
from
'../services/admin'
;
import
*
as
api
from
'../services/admin'
;
import
SocketIO
from
'../utils/socketio'
;
export
default
{
export
default
{
namespace
:
'admin'
,
namespace
:
'admin'
,
...
...
src/pages/FacePage.js
View file @
d008286e
...
@@ -272,7 +272,7 @@ class FacePage extends Component {
...
@@ -272,7 +272,7 @@ class FacePage extends Component {
authinfo
=
async
()
=>
{
authinfo
=
async
()
=>
{
const
rawdata
=
await
WxFacepay
.
rawdata
();
const
rawdata
=
await
WxFacepay
.
rawdata
();
const
{
data
}
=
await
this
.
props
.
dispatch
({
const
{
data
}
=
await
this
.
props
.
dispatch
({
type
:
'goods/
wxauth
info'
,
type
:
'goods/
face
info'
,
rawdata
,
rawdata
,
});
});
return
data
;
return
data
;
...
@@ -286,13 +286,19 @@ class FacePage extends Component {
...
@@ -286,13 +286,19 @@ class FacePage extends Component {
const
tipText
=
'正在人脸识别,请看向屏幕,靠中间站稳'
;
const
tipText
=
'正在人脸识别,请看向屏幕,靠中间站稳'
;
Speech
.
speak
(
tipText
);
Speech
.
speak
(
tipText
);
this
.
setState
({
tip
:
tipText
});
this
.
setState
({
tip
:
tipText
});
const
auth
=
(
await
this
.
authinfo
())
||
{};
let
auth
=
(
await
this
.
authinfo
())
||
{};
if
(
auth
.
return_code
===
'SUCCESS'
)
{
if
(
auth
.
return_code
===
'SUCCESS'
||
(
auth
.
code
===
1
&&
auth
.
data
.
bizCode
===
'0000'
)
)
{
if
(
auth
.
data
)
{
auth
=
auth
.
data
;
}
const
params
=
{
const
params
=
{
appid
:
auth
.
appid
,
appid
:
auth
.
appid
||
auth
.
subAppId
,
mch_id
:
auth
.
mch_id
,
mch_id
:
auth
.
mch_id
||
auth
.
subMchId
,
store_id
:
this
.
storeKey
,
store_id
:
this
.
storeKey
,
authinfo
:
auth
.
authinfo
,
authinfo
:
auth
.
authinfo
||
auth
.
authInfo
,
face_authtype
:
'FACEID-ONCE'
,
face_authtype
:
'FACEID-ONCE'
,
ask_unionid
:
1
,
ask_unionid
:
1
,
};
};
...
@@ -309,6 +315,9 @@ class FacePage extends Component {
...
@@ -309,6 +315,9 @@ class FacePage extends Component {
if
(
!
res
.
openid
)
{
if
(
!
res
.
openid
)
{
return
;
return
;
}
// 没识别到人脸不开门
}
// 没识别到人脸不开门
if
(
res
.
sub_openid
)
{
res
.
openid
=
res
.
sub_openid
;
}
const
ret
=
await
this
.
props
.
dispatch
({
const
ret
=
await
this
.
props
.
dispatch
({
type
:
'store/wxdoor'
,
type
:
'store/wxdoor'
,
openid
:
res
.
openid
,
openid
:
res
.
openid
,
...
...
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