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
9285059c
Commit
9285059c
authored
Sep 14, 2021
by
Confettis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出门刷脸扣款 2
parent
8774b350
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
OrderDetailMini.js
src/components/OrderDetailMini.js
+4
-7
FacePage.js
src/pages/FacePage.js
+5
-4
config.js
src/utils/config.js
+1
-1
No files found.
src/components/OrderDetailMini.js
View file @
9285059c
import
React
,
{
Component
}
from
'react'
;
import
{
Modal
,
View
,
Text
,
Image
,
FlatList
,
ScrollView
}
from
'react-native'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
ModalStyles
from
'./Modal/styles'
;
import
React
,
{
Component
}
from
'react'
;
import
{
FlatList
,
Image
,
Modal
,
ScrollView
,
Text
,
View
}
from
'react-native'
;
import
{
font
}
from
'../utils/common'
;
import
{
font
}
from
'../utils/common'
;
import
NP
from
'../utils/np'
;
import
NP
from
'../utils/np'
;
import
{
setSpText
,
scaleSize
}
from
'../utils/screen'
;
import
{
scaleSize
,
setSpText
}
from
'../utils/screen'
;
import
ModalStyles
from
'./Modal/styles'
;
const
mStyles
=
{
const
mStyles
=
{
...
ModalStyles
,
...
ModalStyles
,
...
@@ -30,9 +30,6 @@ class OrderDetailMini extends Component {
...
@@ -30,9 +30,6 @@ class OrderDetailMini extends Component {
contact
,
contact
,
storeName
,
storeName
,
});
});
setTimeout
(()
=>
{
this
.
props
.
onPress
();
},
2000
);
}
}
// 生成不重复的key
// 生成不重复的key
...
...
src/pages/FacePage.js
View file @
9285059c
...
@@ -449,6 +449,7 @@ class FacePage extends Component {
...
@@ -449,6 +449,7 @@ class FacePage extends Component {
type
:
'goods/faceinfo'
,
type
:
'goods/faceinfo'
,
rawdata
,
rawdata
,
});
});
if
(
data
.
code
!==
1
)
return
null
;
return
data
;
return
data
;
};
};
...
@@ -737,7 +738,8 @@ class FacePage extends Component {
...
@@ -737,7 +738,8 @@ class FacePage extends Component {
};
};
wxFacepay
=
async
()
=>
{
wxFacepay
=
async
()
=>
{
const
auth
=
(
await
this
.
payscoreAuthinfo
())
||
{};
const
{
data
}
=
(
await
this
.
authinfo
())
||
{};
const
auth
=
data
;
let
params
=
null
;
let
params
=
null
;
if
(
auth
.
bizCode
===
'0000'
)
{
if
(
auth
.
bizCode
===
'0000'
)
{
// 随行付支付
// 随行付支付
...
@@ -768,7 +770,7 @@ class FacePage extends Component {
...
@@ -768,7 +770,7 @@ class FacePage extends Component {
if
(
!
params
)
{
if
(
!
params
)
{
if
(
this
.
faceRetry
)
{
if
(
this
.
faceRetry
)
{
this
.
faceRetry
=
false
;
this
.
faceRetry
=
false
;
Speech
.
speak
(
'刷脸支付启动失败,请重新刷脸或扫码支付'
,
true
);
Speech
.
speak
(
'刷脸支付启动失败,请重新刷脸或扫码支付'
);
}
else
{
}
else
{
this
.
faceRetry
=
true
;
this
.
faceRetry
=
true
;
await
this
.
wxFacepay
();
// 重试
await
this
.
wxFacepay
();
// 重试
...
@@ -791,7 +793,7 @@ class FacePage extends Component {
...
@@ -791,7 +793,7 @@ class FacePage extends Component {
smilepay
=
async
()
=>
{
smilepay
=
async
()
=>
{
await
this
.
alipayinfo
();
await
this
.
alipayinfo
();
if
(
!
this
.
alipayInfo
||
!
this
.
alipayInfo
.
metaInfo
)
{
if
(
!
this
.
alipayInfo
||
!
this
.
alipayInfo
.
metaInfo
)
{
Speech
.
speak
(
'刷脸支付启动失败,请重新刷脸或扫码支付'
,
true
);
Speech
.
speak
(
'刷脸支付启动失败,请重新刷脸或扫码支付'
);
return
;
return
;
}
}
const
{
data
}
=
await
this
.
props
.
dispatch
({
const
{
data
}
=
await
this
.
props
.
dispatch
({
...
@@ -861,7 +863,6 @@ class FacePage extends Component {
...
@@ -861,7 +863,6 @@ class FacePage extends Component {
noBarcode
,
noBarcode
,
openid
,
openid
,
});
});
console
.
log
(
'data'
,
data
);
if
(
data
.
code
===
1
)
{
if
(
data
.
code
===
1
)
{
this
.
orderId
=
data
.
data
.
orderId
;
this
.
orderId
=
data
.
data
.
orderId
;
this
.
successPay
(
true
);
this
.
successPay
(
true
);
...
...
src/utils/config.js
View file @
9285059c
...
@@ -2,7 +2,7 @@ const app = ''; // eg: .25h/.eg
...
@@ -2,7 +2,7 @@ const app = ''; // eg: .25h/.eg
export
const
isProd
=
process
.
env
.
NODE_ENV
===
'production'
;
export
const
isProd
=
process
.
env
.
NODE_ENV
===
'production'
;
export
const
host
=
isProd
export
const
host
=
isProd
?
`https://api
${
app
}
.vs-u.com`
?
`https://api
${
app
}
.vs-u.com`
:
'http://192.168.88.
43
:7001'
;
:
'http://192.168.88.
88
:7001'
;
export
const
login
=
`https://m
${
app
}
.vs-u.com`
;
export
const
login
=
`https://m
${
app
}
.vs-u.com`
;
export
const
qrHost
=
login
;
export
const
qrHost
=
login
;
export
const
imgUrl
=
'http://barcod.oss-cn-shenzhen.aliyuncs.com/images/'
;
export
const
imgUrl
=
'http://barcod.oss-cn-shenzhen.aliyuncs.com/images/'
;
...
...
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