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
4ce9a942
Commit
4ce9a942
authored
Jul 28, 2020
by
修福龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收银台界面袋子可分为两行
parent
a14b0e8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
17 deletions
+59
-17
VerticalPage.js
src/pages/VerticalPage.js
+59
-17
No files found.
src/pages/VerticalPage.js
View file @
4ce9a942
...
@@ -365,7 +365,19 @@ class VerticalPage extends Component {
...
@@ -365,7 +365,19 @@ class VerticalPage extends Component {
render
()
{
render
()
{
let
{
admin
,
goods
,
goodsArr
,
qrHost
,
current
}
=
this
.
props
;
let
{
admin
,
goods
,
goodsArr
,
qrHost
,
current
}
=
this
.
props
;
let
{
contact
}
=
this
.
state
;
let
{
contact
}
=
this
.
state
;
pageSize
=
goods
&&
goods
.
bags
.
length
>
0
?
7
:
pageSize
;
pageSize
=
goods
&&
goods
.
bags
.
length
>
0
?
goods
&&
goods
.
bags
.
length
>
6
?
6
:
7
:
pageSize
;
let
bagsData
=
[];
if
(
goods
&&
goods
.
bags
)
{
let
num
=
Math
.
ceil
(
goods
.
bags
.
length
/
3
);
for
(
let
i
=
0
;
i
<
num
;
i
++
)
{
bagsData
.
push
(
goods
.
bags
.
slice
(
i
*
3
,
i
*
3
+
3
));
}
}
window
.
pageSize
=
pageSize
;
window
.
pageSize
=
pageSize
;
contact
=
contact
||
'未授权'
;
contact
=
contact
||
'未授权'
;
let
goodsLength
=
Math
.
ceil
(
parseFloat
(
goodsArr
.
length
/
pageSize
));
let
goodsLength
=
Math
.
ceil
(
parseFloat
(
goodsArr
.
length
/
pageSize
));
...
@@ -473,22 +485,44 @@ class VerticalPage extends Component {
...
@@ -473,22 +485,44 @@ class VerticalPage extends Component {
<
Text
style
=
{
styles
.
btnText
}
>
清除商品
<
/Text
>
<
Text
style
=
{
styles
.
btnText
}
>
清除商品
<
/Text
>
<
/Touch
>
<
/Touch
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
bag
}
>
{
bagsData
.
map
((
v1
,
k
)
=>
{
{
goods
.
bags
.
map
((
v
,
k
)
=>
{
return
(
return
(
<
View
<
Touch
key
=
{
k
}
onPress
=
{()
=>
this
.
props
.
pushBag
(
k
)}
>
key
=
{
k
}
<
View
style
=
{
styles
.
btnBag
}
>
style
=
{
goods
.
bags
.
length
<=
3
?
styles
.
bag
:
styles
.
bagMore
}
>
<
Image
{
v1
.
map
((
v2
,
i
)
=>
{
source
=
{
require
(
'../assets/Vertical/buy.png'
)}
return
(
style
=
{
styles
.
btnImage
}
<
Touch
key
=
{
i
}
onPress
=
{()
=>
this
.
props
.
pushBag
(
i
)}
>
/
>
<
View
style
=
{
styles
.
btnBag
}
>
<
Text
style
=
{
styles
.
textBag
}
>
{
v
.
name
}
<
/Text
>
<
Image
<
Text
style
=
{
styles
.
textBag
}
>
{
v
.
price
}
<
/Text
>
source
=
{
require
(
'../assets/Vertical/buy.png'
)}
<
/View
>
style
=
{
styles
.
btnImage
}
<
/Touch
>
/
>
);
<
Text
style
=
{
styles
.
textBag
}
>
{
v2
.
name
}
<
/Text
>
})}
<
Text
style
=
{
styles
.
textBag
}
>
{
v2
.
price
}
<
/Text
>
<
/View
>
<
/View
>
<
/Touch
>
);
})}
<
/View
>
);
})}
{
/*<View style={styles.bag}>*/
}
{
/* {goods.bags.map((v, k) => {*/
}
{
/* return (*/
}
{
/* <Touch key={k} onPress={() => this.props.pushBag(k)}>*/
}
{
/* <View style={styles.btnBag}>*/
}
{
/* <Image*/
}
{
/* source={require('../assets/Vertical/buy.png')}*/
}
{
/* style={styles.btnImage}*/
}
{
/* />*/
}
{
/* <Text style={styles.textBag}>{v.name}</Text>*/
}
{
/* <Text style={styles.textBag}>{v.price}</Text>*/
}
{
/* </View>*/
}
{
/* </Touch>*/
}
{
/* );*/
}
{
/* })}*/
}
{
/*</View>*/
}
<
View
style
=
{
styles
.
shadow
}
/
>
<
View
style
=
{
styles
.
shadow
}
/
>
<
Touch
onPress
=
{
this
.
wxFacepay
}
>
<
Touch
onPress
=
{
this
.
wxFacepay
}
>
<
View
style
=
{
styles
.
guide
}
>
<
View
style
=
{
styles
.
guide
}
>
...
@@ -740,6 +774,14 @@ const styles = {
...
@@ -740,6 +774,14 @@ const styles = {
backgroundColor
:
'#F0F0F0'
,
backgroundColor
:
'#F0F0F0'
,
// paddingBottom: 20,
// paddingBottom: 20,
},
},
bagMore
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'flex-start'
,
backgroundColor
:
'#F0F0F0'
,
marginLeft
:
'5%'
,
// paddingBottom: 20,
},
btnBag
:
{
btnBag
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
...
...
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