Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
孙凯
7 years ago
Commit
f412febfe4137b24b41bf24aed84114be83c4c6b
1 parent
d80fdf00
add 在productCell中添加购物车 & 修改上报数据不对的bug review by daiqiang
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
js/common/components/ListCell/ProductListCell.js
js/common/components/ListCell/ProductListCell.js
View file @
f412feb
...
...
@@ -151,7 +151,7 @@ export default class ProductListCell extends Component {
render
()
{
let
{
data
,
sourceType
,
similarIndex
,
rowID
,
style
,
needShopCar
}
=
this
.
props
;
let
name
=
data
.
get
(
'product_name'
)
?
data
.
get
(
'product_name'
)
:
''
;
let
yh_exposureData
=
data
.
get
(
'yh_exposureData'
,
null
);
let
yh_exposureData
=
data
.
get
(
'yh_exposureData'
,
null
)
?
data
.
get
(
'yh_exposureData'
,
null
).
toJS
():
''
;
let
is_limitbuy
=
data
.
get
(
'is_limitbuy'
)
&&
data
.
get
(
'is_limitbuy'
)
==
'Y'
;
let
prd_id
=
data
.
get
(
'product_id'
)
?
data
.
get
(
'product_id'
)
:
''
;
let
isGlobal
=
data
.
get
(
'is_global'
)
&&
data
.
get
(
'is_global'
)
==
'Y'
;
// 是否全球购商品
...
...
@@ -179,19 +179,17 @@ export default class ProductListCell extends Component {
{
this
.
_renderPrice
()}
{
!
is_limitbuy
&&
needShopCar
?
<
TouchableOpacity
style
=
{
styles
.
typeShopCar
}
activeOpacity
=
{
0.5
}
onPress
=
{()
=>
{
let
pos_id
=
106
;
this
.
props
.
onPressShopCar
&&
this
.
props
.
onPressShopCar
(
product_skn
,
prd_id
,
pos_id
,
isGlobal
);
}}
>
<
Image
source
=
{
require
(
'../../../guang/image/jgwc_bt.png'
)}
style
=
{
styles
.
button
}
resizeMode
=
{
'contain'
}
><
/Image
>
<
/TouchableOpacity
>
:
null
}
<
/View
>
{
!
is_limitbuy
&&
needShopCar
?
<
TouchableOpacity
style
=
{[
styles
.
typeShopCar
,
style
]}
activeOpacity
=
{
0.5
}
onPress
=
{()
=>
{
let
pos_id
=
106
;
this
.
props
.
onPressShopCar
&&
this
.
props
.
onPressShopCar
(
product_skn
,
prd_id
,
pos_id
,
isGlobal
);
}}
>
<
Image
source
=
{
require
(
'../../../guang/image/jgwc_bt.png'
)}
style
=
{
styles
.
button
}
resizeMode
=
{
'contain'
}
><
/Image
>
<
/TouchableOpacity
>
:
null
}
<
/TouchableOpacity
>
);
}
...
...
@@ -201,8 +199,8 @@ let {width, height} = Dimensions.get('window');
const
DEVICE_WIDTH_RATIO
=
width
/
320
;
let
rowWidth
=
Math
.
ceil
(
137.5
*
DEVICE_WIDTH_RATIO
);
let
rowHeight
=
Math
.
ceil
(
254
*
DEVICE_WIDTH_RATIO
);
let
rowMarginTop
=
Math
.
ceil
(
10
*
DEVICE_WIDTH_RATIO
);
let
rowHeight
=
Math
.
ceil
(
260
*
DEVICE_WIDTH_RATIO
);
let
rowMarginTop
=
Math
.
ceil
(
4
*
DEVICE_WIDTH_RATIO
);
let
rowMarginBottom
=
Math
.
ceil
(
4
*
DEVICE_WIDTH_RATIO
);
const
IMAGE_WIDTH
=
145
;
...
...
Please
register
or
login
to post a comment