Authored by 孙凯

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

@@ -151,7 +151,7 @@ export default class ProductListCell extends Component { @@ -151,7 +151,7 @@ export default class ProductListCell extends Component {
151 render() { 151 render() {
152 let {data, sourceType, similarIndex, rowID, style, needShopCar} = this.props; 152 let {data, sourceType, similarIndex, rowID, style, needShopCar} = this.props;
153 let name = data.get('product_name') ? data.get('product_name') : ''; 153 let name = data.get('product_name') ? data.get('product_name') : '';
154 - let yh_exposureData = data.get('yh_exposureData', null); 154 + let yh_exposureData = data.get('yh_exposureData', null)? data.get('yh_exposureData', null).toJS(): '';
155 let is_limitbuy = data.get('is_limitbuy') && data.get('is_limitbuy') == 'Y'; 155 let is_limitbuy = data.get('is_limitbuy') && data.get('is_limitbuy') == 'Y';
156 let prd_id = data.get('product_id') ? data.get('product_id') : ''; 156 let prd_id = data.get('product_id') ? data.get('product_id') : '';
157 let isGlobal = data.get('is_global') && data.get('is_global') == 'Y'; // 是否全球购商品 157 let isGlobal = data.get('is_global') && data.get('is_global') == 'Y'; // 是否全球购商品
@@ -179,8 +179,9 @@ export default class ProductListCell extends Component { @@ -179,8 +179,9 @@ export default class ProductListCell extends Component {
179 {this._renderPrice()} 179 {this._renderPrice()}
180 180
181 181
  182 + </View>
182 {!is_limitbuy && needShopCar ? 183 {!is_limitbuy && needShopCar ?
183 - <TouchableOpacity style={styles.typeShopCar} activeOpacity={0.5} onPress={() => { 184 + <TouchableOpacity style={[styles.typeShopCar,style]} activeOpacity={0.5} onPress={() => {
184 let pos_id = 106; 185 let pos_id = 106;
185 this.props.onPressShopCar && this.props.onPressShopCar(product_skn,prd_id,pos_id,isGlobal); 186 this.props.onPressShopCar && this.props.onPressShopCar(product_skn,prd_id,pos_id,isGlobal);
186 }}> 187 }}>
@@ -189,9 +190,6 @@ export default class ProductListCell extends Component { @@ -189,9 +190,6 @@ export default class ProductListCell extends Component {
189 : 190 :
190 null 191 null
191 } 192 }
192 -  
193 -  
194 - </View>  
195 </TouchableOpacity> 193 </TouchableOpacity>
196 ); 194 );
197 } 195 }
@@ -201,8 +199,8 @@ let {width, height} = Dimensions.get('window'); @@ -201,8 +199,8 @@ let {width, height} = Dimensions.get('window');
201 199
202 const DEVICE_WIDTH_RATIO = width / 320; 200 const DEVICE_WIDTH_RATIO = width / 320;
203 let rowWidth = Math.ceil(137.5 * DEVICE_WIDTH_RATIO); 201 let rowWidth = Math.ceil(137.5 * DEVICE_WIDTH_RATIO);
204 -let rowHeight = Math.ceil(254 * DEVICE_WIDTH_RATIO);  
205 -let rowMarginTop = Math.ceil(10 * DEVICE_WIDTH_RATIO); 202 +let rowHeight = Math.ceil(260 * DEVICE_WIDTH_RATIO);
  203 +let rowMarginTop = Math.ceil(4 * DEVICE_WIDTH_RATIO);
206 let rowMarginBottom = Math.ceil(4 * DEVICE_WIDTH_RATIO); 204 let rowMarginBottom = Math.ceil(4 * DEVICE_WIDTH_RATIO);
207 205
208 const IMAGE_WIDTH = 145; 206 const IMAGE_WIDTH = 145;