Authored by chenl

增加了productList兼容性判断,修复了android 0.44不能显示价格的问题。

... ... @@ -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,
... ...
... ... @@ -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}
... ...