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
chenl
8 years ago
Commit
a0991178e6dbf285d62317df5907620066921ac8
1 parent
c82f4d6e
增加了productList兼容性判断,修复了android 0.44不能显示价格的问题。
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
js/common/components/ListCell/ProductListCell.js
js/newArrival/components/newArrival/NewArrivalCell.js
js/common/components/ListCell/ProductListCell.js
View file @
a099117
...
...
@@ -102,7 +102,7 @@ export default class ProductListCell extends Component {
}
_renderPrice
()
{
let
{
data
,
sourceType
}
=
this
.
props
;
let
{
data
,
sourceType
,
fromPage
}
=
this
.
props
;
let
isGlobalProduct
=
data
.
get
(
'is_global'
)
&&
data
.
get
(
'is_global'
)
==
'Y'
;
// 是否全球购商品
let
salePrice
=
0
;
// 售卖价
...
...
@@ -129,8 +129,11 @@ export default class ProductListCell extends Component {
salePriceColor
=
'#444444'
;
}
//新品到着升级为sectionList后价格会被遮挡
let
priceMarginTop
=
(
Platform
.
OS
===
'android'
&&
fromPage
===
'newArrival'
)
?
Math
.
ceil
(
-
18
*
DEVICE_WIDTH_RATIO
)
:
Math
.
ceil
(
-
4
*
DEVICE_WIDTH_RATIO
);
return
(
<
View
style
=
{
styles
.
priceContainer
}
>
<
View
style
=
{
[
styles
.
priceContainer
,
{
marginTop
:
priceMarginTop
,}
]
}
>
<
Text
style
=
{[
styles
.
nowPrice
,
{
color
:
salePriceColor
}]}
numberOfLines
=
{
1
}
>
{
salePriceStr
}
<
/Text
>
{
showOriginPrice
?
<
DeleteLineText
style
=
{
styles
.
oldPriceContainer
}
...
...
@@ -203,8 +206,6 @@ let almostSoldOutImageTop = imageHeight - almostSoldOutImageHeight;
let
nameMarginTop
=
Math
.
ceil
(
12
*
DEVICE_WIDTH_RATIO
);
let
nameHeight
=
Math
.
ceil
(
36
*
DEVICE_WIDTH_RATIO
);
let
priceMarginTop
=
Math
.
ceil
(
-
4
*
DEVICE_WIDTH_RATIO
);
let
gpSoldOutImageHeight
=
Math
.
ceil
(
25
*
DEVICE_WIDTH_RATIO
);
let
styles
=
StyleSheet
.
create
({
...
...
@@ -256,7 +257,6 @@ let styles = StyleSheet.create({
},
priceContainer
:
{
flexDirection
:
'row'
,
marginTop
:
priceMarginTop
,
},
nowPrice
:
{
fontSize
:
12
,
...
...
js/newArrival/components/newArrival/NewArrivalCell.js
View file @
a099117
...
...
@@ -93,6 +93,7 @@ export default class NewArrivalCell extends Component {
rowID
=
{
index
}
data
=
{
rowData
}
similarIndex
=
{
similarIndex
}
fromPage
=
{
'newArrival'
}
onPressProduct
=
{
this
.
props
.
onPressProductListProduct
}
onLongPressProduct
=
{
this
.
props
.
onLongPressProduct
}
onPressFindSimilar
=
{
this
.
props
.
onPressFindSimilar
}
...
...
Please
register
or
login
to post a comment