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
94961a92
Commit
94961a92
authored
Dec 04, 2020
by
王崇仁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刷脸页面和收银台添加跳转无障碍按钮
parent
58ff831d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
2 deletions
+64
-2
FacePage.js
src/pages/FacePage.js
+32
-1
VerticalPage.js
src/pages/VerticalPage.js
+32
-1
No files found.
src/pages/FacePage.js
View file @
94961a92
...
...
@@ -20,6 +20,8 @@ import Toast from '../components/Toast';
import
Screensaver
from
'../components/Screensaver'
;
import
{
width
,
setSpText
,
scaleSize
}
from
'../utils/screen'
;
import
{
qrHost
}
from
'../utils/config'
;
import
Icons
from
'react-native-vector-icons/MaterialIcons'
;
import
AutoClick
from
'../utils/AutoClick'
;
class
FacePage
extends
Component
{
state
=
{
...
...
@@ -35,11 +37,12 @@ class FacePage extends Component {
tip
:
''
,
tipsModal
:
false
,
faceType
:
'wxpay'
,
sleep
:
tru
e
,
sleep
:
fals
e
,
loadingModal
:
false
,
qrCode
:
''
,
goTipsModal
:
false
,
type
:
''
,
setting
:
false
,
};
async
componentWillMount
()
{
...
...
@@ -55,8 +58,14 @@ class FacePage extends Component {
this
.
setState
({
faceType
:
'alipay'
});
}
}
const
setting
=
await
AutoClick
.
isSettingsOn
();
if
(
!
setting
)
this
.
setState
({
setting
:
true
});
// 展示按钮
}
setting
=
async
()
=>
{
await
AutoClick
.
goSetting
();
// 按钮跳转设置
};
async
componentDidMount
()
{
this
.
listen
();
}
...
...
@@ -587,6 +596,27 @@ class FacePage extends Component {
/
>
<
/Touch
>
<
/View
>
{
this
.
state
.
setting
&&
(
<
Touch
onPress
=
{
this
.
setting
}
style
=
{{
position
:
'absolute'
,
width
:
100
,
height
:
100
,
bottom
:
200
,
right
:
0
,
backgroundColor
:
'rgba(0,0,0,0.1)'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
borderRadius
:
10
,
zIndex
:
999
,
}}
>
<
Icons
name
=
"accessibility"
style
=
{{
fontSize
:
60
,
color
:
'#fff'
}}
/
>
<
/Touch
>
)}
<
Touch
onPress
=
{
this
.
face
}
style
=
{
styles
.
btnCome
}
feedback
=
{
false
}
>
<
View
style
=
{
styles
.
click
}
>
<
Image
...
...
@@ -745,6 +775,7 @@ const styles = {
flexDirection
:
'column'
,
alignItems
:
'center'
,
justifyContent
:
'space-around'
,
position
:
'relative'
,
},
faceRecogn
:
{
flex
:
0.7
,
...
...
src/pages/VerticalPage.js
View file @
94961a92
...
...
@@ -4,9 +4,11 @@ import AsyncStorage from '@react-native-community/async-storage';
import
Swiper
from
'react-native-swiper'
;
import
QRCode
from
'react-native-qrcode-svg'
;
import
Icon
from
'react-native-vector-icons/Ionicons'
;
import
Icons
from
'react-native-vector-icons/MaterialIcons'
;
// import { connect } from 'react-redux';
import
CounterMixins
from
'./CounterMixins'
;
import
NP
from
'../utils/np'
;
import
AutoClick
from
'../utils/AutoClick'
;
import
Touch
from
'../components/Touch'
;
import
logo
from
'../assets/Vertical/logo.png'
;
import
counterText
from
'../assets/Vertical/counterText.png'
;
...
...
@@ -36,6 +38,7 @@ class VerticalPage extends Component {
talkCall
:
2
,
// 0请求通话,1通话中,2,已挂断通话,待机状态
faceType
:
'wxpay'
,
hintVisible
:
false
,
setting
:
false
,
};
async
componentWillMount
()
{
...
...
@@ -52,8 +55,14 @@ class VerticalPage extends Component {
this
.
setState
({
faceType
:
'alipay'
});
}
}
const
setting
=
await
AutoClick
.
isSettingsOn
();
if
(
!
setting
)
this
.
setState
({
setting
:
true
});
// 展示按钮
}
setting
=
async
()
=>
{
await
AutoClick
.
goSetting
();
// 按钮跳转设置
};
async
componentDidMount
()
{
this
.
listen
();
}
...
...
@@ -521,7 +530,12 @@ class VerticalPage extends Component {
renderItem
=
{({
item
,
index
})
=>
this
.
renderCell
(
item
,
index
)}
/
>
<
/View
>
<
View
style
=
{{
width
:
'10%'
,
flexDirection
:
'column'
}}
>
<
View
style
=
{{
width
:
'10%'
,
flexDirection
:
'column'
,
justifyContent
:
'center'
,
}}
>
<
View
style
=
{{
height
:
width
>
801
?
81
:
scaleHeight
(
118
),
...
...
@@ -558,6 +572,23 @@ class VerticalPage extends Component {
/
>
<
/Touch
>
<
/View
>
{
this
.
state
.
setting
&&
(
<
Touch
onPress
=
{
this
.
setting
}
style
=
{{
backgroundColor
:
'rgba(0,0,0,0.1)'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
borderRadius
:
10
,
paddingBottom
:
20
,
paddingTop
:
20
,
}}
>
<
Icons
name
=
"accessibility"
style
=
{{
fontSize
:
60
,
color
:
'#fff'
}}
/
>
<
/Touch
>
)}
<
/View
>
<
/View
>
<
View
...
...
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