|
|
'use strict';
|
|
|
|
|
|
import React, {Component} from 'react';
|
|
|
import {Dimensions, StyleSheet, Text, TouchableOpacity, View} from 'react-native';
|
|
|
import {Dimensions, StyleSheet, Text, TouchableOpacity, View, Image} from 'react-native';
|
|
|
|
|
|
import YH_Image from '../../../common/components/YH_Image';
|
|
|
|
...
|
...
|
@@ -15,6 +15,11 @@ export default class ProductCell extends Component { |
|
|
let data = this.props.data;
|
|
|
let prdImage = YH_Image.getSlicedUrl(data.get('default_images', ''), 80, 109, 2);
|
|
|
let yh_exposureData = this.props.yh_exposureData ? this.props.yh_exposureData : null;
|
|
|
|
|
|
let activityId = data.get('collage_activity_id');
|
|
|
let salesPrice = activityId && activityId != 0 ? data.get('collage_price') : data.get('sales_price');
|
|
|
let rebatesPrice = activityId && activityId != 0 ? data.get('collage_rebates_amount') : data.get('rebates_amount');
|
|
|
let groupWidth = activityId && activityId != 0 ? 50 : 0;
|
|
|
return (
|
|
|
<View>
|
|
|
<View style={styles.fatherContainer}>
|
...
|
...
|
@@ -27,14 +32,15 @@ export default class ProductCell extends Component { |
|
|
<YH_Image style={styles.prdImage} url={prdImage}/>
|
|
|
<Text style={styles.prdName} numberOfLines={2}>{data.get('product_name', '')}</Text>
|
|
|
<View style={styles.priceContainer}>
|
|
|
<Text style={styles.nowPrice} numberOfLines={1}>¥{data.get('sales_price')}</Text>
|
|
|
<Text style={styles.nowPrice} numberOfLines={1}>¥{salesPrice}</Text>
|
|
|
<Image source={require('../../images/Group3.png')} style={{marginLeft: 10, height: 17, width: groupWidth}} />
|
|
|
</View>
|
|
|
<View style={[styles.bottomView, styles.returnTextContainer]}>
|
|
|
<Text style={styles.returnText}>最高返</Text>
|
|
|
<Text style={[styles.returnText, {
|
|
|
marginLeft: 4,
|
|
|
fontSize: 16
|
|
|
}]}>¥{data.get('rebates_amount')}</Text>
|
|
|
}]}>¥{rebatesPrice}</Text>
|
|
|
</View>
|
|
|
<View style={styles.shareContainer}>
|
|
|
<Text style={styles.share}>去分享</Text>
|
...
|
...
|
|