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
272e4e81
Commit
272e4e81
authored
Jul 27, 2020
by
修福龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
界面适配
parent
7086a8ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
63 deletions
+70
-63
VerticalPage.js
src/pages/VerticalPage.js
+70
-63
No files found.
src/pages/VerticalPage.js
View file @
272e4e81
...
@@ -15,7 +15,7 @@ import phone from '../assets/Vertical/phone.png';
...
@@ -15,7 +15,7 @@ import phone from '../assets/Vertical/phone.png';
import
{
login
}
from
'../utils/config'
;
import
{
login
}
from
'../utils/config'
;
import
{
colors
}
from
'../utils/common'
;
import
{
colors
}
from
'../utils/common'
;
import
WxFacepay
from
'../utils/WxFacepay'
;
import
WxFacepay
from
'../utils/WxFacepay'
;
import
{
width
}
from
'../utils/screen'
;
import
{
width
,
height
}
from
'../utils/screen'
;
import
Speech
from
'../utils/Speech'
;
import
Speech
from
'../utils/Speech'
;
import
delay
from
'../utils/delay'
;
import
delay
from
'../utils/delay'
;
import
{
leaveTalkCall
,
onTalkCall
}
from
'../utils/agora'
;
import
{
leaveTalkCall
,
onTalkCall
}
from
'../utils/agora'
;
...
@@ -384,6 +384,7 @@ class VerticalPage extends Component {
...
@@ -384,6 +384,7 @@ class VerticalPage extends Component {
});
});
this
.
totalPrice
=
totalPrice
;
this
.
totalPrice
=
totalPrice
;
this
.
totalCount
=
totalCount
;
this
.
totalCount
=
totalCount
;
console
.
warn
(
width
,
height
);
return
(
return
(
<
View
style
=
{
styles
.
main
}
>
<
View
style
=
{
styles
.
main
}
>
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
header
}
>
...
@@ -412,8 +413,10 @@ class VerticalPage extends Component {
...
@@ -412,8 +413,10 @@ class VerticalPage extends Component {
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
width
:
'10%'
,
flexDirection
:
'column'
}}
>
<
View
style
=
{{
width
:
'10%'
,
flexDirection
:
'column'
}}
>
<
View
style
=
{{
height
:
81
,
backgroundColor
:
'#fff'
}}
/
>
<
View
<
View
style
=
{{
height
:
8
}}
/
>
style
=
{{
height
:
width
>
801
?
81
:
77
,
backgroundColor
:
'#fff'
}}
/
>
<
View
style
=
{{
height
:
width
>
801
?
8
:
10
}}
/
>
<
View
style
=
{
styles
.
pagination
}
>
<
View
style
=
{
styles
.
pagination
}
>
<
Touch
<
Touch
disabled
=
{
current
<=
1
}
disabled
=
{
current
<=
1
}
...
@@ -509,7 +512,6 @@ class VerticalPage extends Component {
...
@@ -509,7 +512,6 @@ class VerticalPage extends Component {
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
amount
}
>
<
View
style
=
{
styles
.
amount
}
>
<
Text
style
=
{
styles
.
leftText2
}
>
<
Text
style
=
{
styles
.
leftText2
}
>
{
' '
}
{
NP
.
round
(
Number
(
totalPrice
)
+
Number
(
totalCount
),
2
).
toFixed
(
{
NP
.
round
(
Number
(
totalPrice
)
+
Number
(
totalCount
),
2
).
toFixed
(
2
,
2
,
)}
)}
...
@@ -518,7 +520,6 @@ class VerticalPage extends Component {
...
@@ -518,7 +520,6 @@ class VerticalPage extends Component {
{
NP
.
round
(
total
,
2
).
toFixed
(
2
)}
{
NP
.
round
(
total
,
2
).
toFixed
(
2
)}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
leftText2
}
>
<
Text
style
=
{
styles
.
leftText2
}
>
{
' '
}
-
{
NP
.
round
(
totalCount
,
2
).
toFixed
(
2
)}
-
{
NP
.
round
(
totalCount
,
2
).
toFixed
(
2
)}
<
/Text
>
<
/Text
>
<
View
style
=
{
styles
.
leftLine2
}
/
>
<
View
style
=
{
styles
.
leftLine2
}
/
>
...
@@ -564,10 +565,10 @@ class VerticalPage extends Component {
...
@@ -564,10 +565,10 @@ class VerticalPage extends Component {
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
paymentRightCode
}
>
<
View
style
=
{
styles
.
paymentRightCode
}
>
<
QRCode
<
QRCode
logoSize
=
{
5
0
}
logoSize
=
{
width
>
801
?
50
:
4
0
}
// logoBackgroundColor="#fc4000"
// logoBackgroundColor="#fc4000"
logo
=
{
require
(
'../assets/logo2.png'
)}
logo
=
{
require
(
'../assets/logo2.png'
)}
size
=
{
20
0
}
size
=
{
width
>
801
?
200
:
18
0
}
value
=
{
`
${
qrHost
||
login
}
/#/counter-order-
${
admin
.
socket
}
`
}
value
=
{
`
${
qrHost
||
login
}
/#/counter-order-
${
admin
.
socket
}
`
}
/
>
/
>
<
/View
>
<
/View
>
...
@@ -588,30 +589,34 @@ class VerticalPage extends Component {
...
@@ -588,30 +589,34 @@ class VerticalPage extends Component {
<
/Text
>
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
footer
}
>
{
width
>
801
?
(
<
Swiper
<
View
style
=
{
styles
.
footer
}
>
style
=
{
styles
.
swiper
}
// 样式
<
Swiper
loop
// 如果设置为false,那么滑动到最后一张时,再次滑动将不会滑到第一张图片。
style
=
{
styles
.
swiper
}
// 样式
autoplay
// 自动轮播
loop
// 如果设置为false,那么滑动到最后一张时,再次滑动将不会滑到第一张图片。
autoplayTimeout
=
{
10
}
// 每隔4秒切换
autoplay
// 自动轮播
horizontal
// 水平方向,为false可设置为竖直方向
autoplayTimeout
=
{
10
}
// 每隔4秒切换
showsButtons
=
{
false
}
// 为false时不显示控制按钮
horizontal
// 水平方向,为false可设置为竖直方向
showsPagination
=
{
false
}
// 为false不显示下方圆点
showsButtons
=
{
false
}
// 为false时不显示控制按钮
>
showsPagination
=
{
false
}
// 为false不显示下方圆点
<
Image
>
source
=
{
require
(
'../assets/Vertical/first.jpg'
)}
<
Image
style
=
{
styles
.
swiperImg
}
source
=
{
require
(
'../assets/Vertical/first.jpg'
)}
/
>
style
=
{
styles
.
swiperImg
}
<
Image
/
>
source
=
{
require
(
'../assets/Vertical/second.jpg'
)}
<
Image
style
=
{
styles
.
swiperImg
}
source
=
{
require
(
'../assets/Vertical/second.jpg'
)}
/
>
style
=
{
styles
.
swiperImg
}
<
Image
/
>
source
=
{
require
(
'../assets/Vertical/third.jpg'
)}
<
Image
style
=
{
styles
.
swiperImg
}
source
=
{
require
(
'../assets/Vertical/third.jpg'
)}
/
>
style
=
{
styles
.
swiperImg
}
<
/Swiper
>
/
>
<
/View
>
<
/Swiper
>
<
/View
>
)
:
(
<
View
/>
)}
<
/View
>
<
/View
>
);
);
}
}
...
@@ -627,16 +632,16 @@ const styles = {
...
@@ -627,16 +632,16 @@ const styles = {
flexDirection
:
'row'
,
flexDirection
:
'row'
,
backgroundColor
:
'#fc4000'
,
backgroundColor
:
'#fc4000'
,
height
:
'6%'
,
height
:
'6%'
,
paddingRight
:
4
0
,
paddingRight
:
width
>
801
?
40
:
2
0
,
paddingLeft
:
4
0
,
paddingLeft
:
width
>
801
?
40
:
2
0
,
},
},
left
:
{
left
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
width
:
'60
%'
,
width
:
width
>
801
?
'60%'
:
'55
%'
,
},
},
counterText
:
{
counterText
:
{
marginLeft
:
4
0
,
marginLeft
:
width
>
801
?
40
:
2
0
,
marginRight
:
4
0
,
marginRight
:
width
>
801
?
40
:
2
0
,
},
},
right
:
{
right
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
...
@@ -645,7 +650,7 @@ const styles = {
...
@@ -645,7 +650,7 @@ const styles = {
width
:
60
,
width
:
60
,
height
:
60
,
height
:
60
,
marginRight
:
10
,
marginRight
:
10
,
marginLeft
:
20
,
marginLeft
:
width
>
801
?
20
:
15
,
},
},
number
:
{
number
:
{
fontSize
:
45
,
fontSize
:
45
,
...
@@ -662,7 +667,7 @@ const styles = {
...
@@ -662,7 +667,7 @@ const styles = {
flexDirection
:
'row'
,
flexDirection
:
'row'
,
},
},
container
:
{
container
:
{
height
:
'62
%'
,
height
:
width
>
801
?
'62%'
:
'94
%'
,
},
},
goodsStyle
:
{
goodsStyle
:
{
width
:
'100%'
,
width
:
'100%'
,
...
@@ -801,7 +806,7 @@ const styles = {
...
@@ -801,7 +806,7 @@ const styles = {
width
:
'34%'
,
width
:
'34%'
,
display
:
'flex'
,
display
:
'flex'
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
alignContent
:
'space-around'
,
//
alignContent: 'space-around',
borderLeftWidth
:
1
,
borderLeftWidth
:
1
,
borderTopWidth
:
1
,
borderTopWidth
:
1
,
borderBottomWidth
:
1
,
borderBottomWidth
:
1
,
...
@@ -828,7 +833,8 @@ const styles = {
...
@@ -828,7 +833,8 @@ const styles = {
width
:
'50%'
,
width
:
'50%'
,
display
:
'flex'
,
display
:
'flex'
,
flexDirection
:
'column'
,
flexDirection
:
'column'
,
alignContent
:
'center'
,
// alignContent: 'center',
justifyContent
:
'center'
,
alignItems
:
'flex-end'
,
alignItems
:
'flex-end'
,
},
},
leftLine1
:
{
leftLine1
:
{
...
@@ -838,28 +844,29 @@ const styles = {
...
@@ -838,28 +844,29 @@ const styles = {
height
:
1
,
height
:
1
,
},
},
amount
:
{
amount
:
{
width
:
'
4
0%'
,
width
:
'
5
0%'
,
display
:
'flex'
,
display
:
'flex'
,
flexDirection
:
'column'
,
flexDirection
:
'column'
,
alignContent
:
'center'
,
// alignContent: 'center',
alignItems
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'flex-start'
,
},
},
total
:
{
total
:
{
color
:
'red'
,
color
:
'red'
,
fontSize
:
40
,
fontSize
:
width
>
801
?
40
:
35
,
},
},
leftLine2
:
{
leftLine2
:
{
width
:
'
10
0%'
,
width
:
'
7
0%'
,
borderWidth
:
1
,
borderWidth
:
1
,
borderColor
:
'#959595'
,
borderColor
:
'#959595'
,
height
:
1
,
height
:
1
,
},
},
leftText1
:
{
leftText1
:
{
fontSize
:
40
,
fontSize
:
width
>
801
?
40
:
35
,
marginRight
:
30
,
marginRight
:
width
>
801
?
30
:
18
,
},
},
leftText2
:
{
leftText2
:
{
fontSize
:
40
,
fontSize
:
width
>
801
?
40
:
35
,
},
},
faceScan
:
{
faceScan
:
{
width
:
'32%'
,
width
:
'32%'
,
...
@@ -932,14 +939,14 @@ const styles = {
...
@@ -932,14 +939,14 @@ const styles = {
paymentRightContents
:
{
paymentRightContents
:
{
display
:
'flex'
,
display
:
'flex'
,
flexDirection
:
'column'
,
flexDirection
:
'column'
,
marginRight
:
4
0
,
marginRight
:
width
>
801
?
40
:
1
0
,
},
},
paymentRightText
:
{
paymentRightText
:
{
fontSize
:
35
,
fontSize
:
width
>
801
?
35
:
30
,
},
},
paymentRightImage
:
{
paymentRightImage
:
{
width
:
5
0
,
width
:
width
>
801
?
50
:
4
0
,
height
:
5
0
,
height
:
width
>
801
?
50
:
4
0
,
marginTop
:
5
,
marginTop
:
5
,
marginBottom
:
5
,
marginBottom
:
5
,
},
},
...
@@ -977,8 +984,8 @@ const styles = {
...
@@ -977,8 +984,8 @@ const styles = {
firstTdStyle
:
{
firstTdStyle
:
{
width
:
'40%'
,
width
:
'40%'
,
alignItems
:
'flex-start'
,
alignItems
:
'flex-start'
,
paddingTop
:
18
,
paddingTop
:
width
>
801
?
18
:
16
,
paddingBottom
:
18
,
paddingBottom
:
width
>
801
?
18
:
16
,
paddingLeft
:
10
,
paddingLeft
:
10
,
paddingRight
:
10
,
paddingRight
:
10
,
},
},
...
@@ -987,8 +994,8 @@ const styles = {
...
@@ -987,8 +994,8 @@ const styles = {
width
:
'20%'
,
width
:
'20%'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
paddingTop
:
18
,
paddingTop
:
width
>
801
?
18
:
16
,
paddingBottom
:
18
,
paddingBottom
:
width
>
801
?
18
:
16
,
paddingLeft
:
10
,
paddingLeft
:
10
,
paddingRight
:
10
,
paddingRight
:
10
,
},
},
...
@@ -1001,10 +1008,10 @@ const styles = {
...
@@ -1001,10 +1008,10 @@ const styles = {
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
backgroundColor
:
'#fc4000'
,
backgroundColor
:
'#fc4000'
,
padding
:
2
0
,
padding
:
width
>
801
?
20
:
1
0
,
},
},
explainText1
:
{
explainText1
:
{
fontSize
:
30
,
fontSize
:
width
>
801
?
30
:
25
,
color
:
'#fff'
,
color
:
'#fff'
,
marginRight
:
3
,
marginRight
:
3
,
},
},
...
@@ -1012,20 +1019,20 @@ const styles = {
...
@@ -1012,20 +1019,20 @@ const styles = {
display
:
'flex'
,
display
:
'flex'
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
width
:
40
,
width
:
width
>
801
?
40
:
35
,
height
:
40
,
height
:
width
>
801
?
40
:
35
,
backgroundColor
:
'#fff'
,
backgroundColor
:
'#fff'
,
borderRadius
:
20
,
borderRadius
:
20
,
marginRight
:
5
,
marginRight
:
5
,
},
},
explainText2
:
{
explainText2
:
{
color
:
'#fc4000'
,
color
:
'#fc4000'
,
fontSize
:
30
,
fontSize
:
width
>
801
?
30
:
25
,
},
},
code
:
{
code
:
{
fontSize
:
30
,
fontSize
:
width
>
801
?
30
:
25
,
color
:
'#fff'
,
color
:
'#fff'
,
marginRight
:
50
,
marginRight
:
width
>
801
?
50
:
25
,
},
},
footer
:
{
footer
:
{
height
:
'32%'
,
height
:
'32%'
,
...
...
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