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
daa61daf
Commit
daa61daf
authored
May 24, 2024
by
黄日华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收银程序刷脸启动失败自动刷新
parent
de618f1d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
Settles.js
src/components/Settles.js
+8
-1
FacePage.js
src/pages/FacePage.js
+7
-2
VerticalPage.js
src/pages/VerticalPage.js
+5
-1
No files found.
src/components/Settles.js
View file @
daa61daf
...
@@ -10,6 +10,9 @@ import Speech from '../utils/Speech';
...
@@ -10,6 +10,9 @@ import Speech from '../utils/Speech';
import
Toast
from
'./Toast'
;
import
Toast
from
'./Toast'
;
import
Smilepay
from
'../utils/Smilepay'
;
import
Smilepay
from
'../utils/Smilepay'
;
import
KeyEvent
from
'react-native-keyevent'
;
import
KeyEvent
from
'react-native-keyevent'
;
import
Restart
from
'../utils/Restart'
;
window
.
restart
=
Restart
.
restartApp
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'screen'
);
const
{
width
,
height
}
=
Dimensions
.
get
(
'screen'
);
const
paidTime
=
30
;
// 支付完成等待时间 30s
const
paidTime
=
30
;
// 支付完成等待时间 30s
...
@@ -223,7 +226,11 @@ class Settles extends React.Component {
...
@@ -223,7 +226,11 @@ class Settles extends React.Component {
}
}
await
this
.
alipayinfo
();
await
this
.
alipayinfo
();
if
(
!
this
.
alipayInfo
||
!
this
.
alipayInfo
.
metaInfo
)
{
if
(
!
this
.
alipayInfo
||
!
this
.
alipayInfo
.
metaInfo
)
{
this
.
props
.
speak
(
'刷脸支付启动失败,请重新刷脸或扫码支付'
,
true
);
this
.
props
.
speak
(
'刷脸支付启动失败,正在重新启动应用进行修复,请稍等...'
,
true
,
);
Restart
.
restartApp
();
return
;
return
;
}
}
const
{
data
}
=
await
this
.
props
.
dispatch
({
const
{
data
}
=
await
this
.
props
.
dispatch
({
...
...
src/pages/FacePage.js
View file @
daa61daf
...
@@ -24,6 +24,9 @@ import Smilepay from '../utils/Smilepay';
...
@@ -24,6 +24,9 @@ import Smilepay from '../utils/Smilepay';
import
Speech
from
'../utils/Speech'
;
import
Speech
from
'../utils/Speech'
;
import
validity
from
'../utils/validity'
;
import
validity
from
'../utils/validity'
;
import
WxFacepay
from
'../utils/WxFacepay'
;
import
WxFacepay
from
'../utils/WxFacepay'
;
import
Restart
from
'../utils/Restart'
;
window
.
restart
=
Restart
.
restartApp
;
const
wait
=
t
=>
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
t
));
const
wait
=
t
=>
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
t
));
...
@@ -785,7 +788,8 @@ class FacePage extends Component {
...
@@ -785,7 +788,8 @@ class FacePage extends Component {
if
(
!
params
)
{
if
(
!
params
)
{
if
(
this
.
faceRetry
)
{
if
(
this
.
faceRetry
)
{
this
.
faceRetry
=
false
;
this
.
faceRetry
=
false
;
Speech
.
speak
(
'刷脸支付启动失败,请重新刷脸或扫码支付'
);
Speech
.
speak
(
'刷脸支付启动失败,正在重新启动应用进行修复,请稍等...'
);
Restart
.
restartApp
();
}
else
{
}
else
{
this
.
faceRetry
=
true
;
this
.
faceRetry
=
true
;
await
this
.
wxFacepay
();
// 重试
await
this
.
wxFacepay
();
// 重试
...
@@ -808,7 +812,8 @@ class FacePage extends Component {
...
@@ -808,7 +812,8 @@ 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
(
'刷脸支付启动失败,请重新刷脸或扫码支付'
);
Speech
.
speak
(
'刷脸支付启动失败,正在重新启动应用进行修复,请稍等...'
);
Restart
.
restartApp
();
return
;
return
;
}
}
const
{
data
}
=
await
this
.
props
.
dispatch
({
const
{
data
}
=
await
this
.
props
.
dispatch
({
...
...
src/pages/VerticalPage.js
View file @
daa61daf
...
@@ -332,7 +332,11 @@ class VerticalPage extends Component {
...
@@ -332,7 +332,11 @@ class VerticalPage extends Component {
}
}
await
this
.
alipayinfo
();
await
this
.
alipayinfo
();
if
(
!
this
.
alipayInfo
||
!
this
.
alipayInfo
.
metaInfo
)
{
if
(
!
this
.
alipayInfo
||
!
this
.
alipayInfo
.
metaInfo
)
{
this
.
props
.
speak
(
'刷脸支付启动失败,请重新刷脸或扫码支付'
,
true
);
this
.
props
.
speak
(
'刷脸支付启动失败,正在重新启动应用进行修复,请稍等...'
,
true
,
);
Restart
.
restartApp
();
return
;
return
;
}
}
const
{
data
}
=
await
this
.
props
.
dispatch
({
const
{
data
}
=
await
this
.
props
.
dispatch
({
...
...
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