Authored by 孙凯

add 在productCell中添加购物车 & 修改上报数据不对的bug review by daiqiang

... ... @@ -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,8 +179,9 @@ export default class ProductListCell extends Component {
{this._renderPrice()}
</View>
{!is_limitbuy && needShopCar ?
<TouchableOpacity style={styles.typeShopCar} activeOpacity={0.5} onPress={() => {
<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);
}}>
... ... @@ -189,9 +190,6 @@ export default class ProductListCell extends Component {
:
null
}
</View>
</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;
... ...