Authored by 张文文

显示拼团价信息

... ... @@ -113,7 +113,9 @@ export default function native(platform) {
<Provider store={store}>
<ShareDetailContainer
product_skn={this.props.product_skn}
product_id={this.props.product_id}/>
product_id={this.props.product_id}
collage_activity_id={this.props.collage_activity_id}
collage_price={this.props.collage_price}/>
</Provider>
);
} else if (type === 'recommendProduct') {
... ... @@ -135,7 +137,7 @@ export default function native(platform) {
} else if (type === 'estimateDetails') {
return (
<Provider store={store}>
<EstimateDetailContainer
<EstimateDetailContainer
time_type={this.props.time_type}
tab_type={this.props.tab_type}/>
</Provider>
... ...
... ... @@ -84,6 +84,10 @@ export default class ShareDetail extends Component {
let imgList = goodsImagesList && goodsImagesList.map(item => ({src: item.imageUrl}));
imgList = Immutable.fromJS(imgList);
let activityId = this.props.collage_activity_id;
let salesPrice = activityId && activityId != -1 ? this.props.collage_price : productPriceBo.salesPrice;
let groupWidth = activityId && activityId != -1 ? 50 : 0;
return (
<View>
<View style={[styles.imgContainer]}>
... ... @@ -101,6 +105,7 @@ export default class ShareDetail extends Component {
<Text style={styles.price}>{productPriceBo.salesPrice}</Text>
{productPriceBo.salesPrice !== productPriceBo.marketPrice && <Text style={styles.origpriceUnit}></Text>}
{productPriceBo.salesPrice !== productPriceBo.marketPrice && <Text style={styles.origPrice}>{productPriceBo.marketPrice}</Text>}
<Image source={require('../images/Group3.png')} style={{marginLeft: 10, height: 17, width: groupWidth}} />
</View>
</View>
</View>
... ...
'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>
... ...
... ... @@ -129,6 +129,11 @@ class HomeContainer extends Component {
let productSkn = product && product.get('product_skn', 0);
let product_id = product && product.get('product_id', 0);
//拼团需要传递的字段
let collage_activity_id = product && product.get('collage_activity_id', -1);
let collage_price = product && product.get('collage_price', 0);
if (!productSkn) {
return;
}
... ... @@ -138,7 +143,7 @@ class HomeContainer extends Component {
pageName = 'aFP_Alliance';
}
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}"}}`;
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id":"${collage_activity_id}", "collage_price":"${collage_price}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
... ...
... ... @@ -74,6 +74,11 @@ class RecommendContainer extends Component {
onPressProduct(product) {
let productSkn = product && product.get('product_skn', 0);
let product_id = product && product.get('product_id', 0);
//拼团需要传递的字段
let collage_activity_id = product && product.get('collage_activity_id', -1);
let collage_price = product && product.get('collage_price', 0);
if (!productSkn) {
return;
}
... ... @@ -83,7 +88,7 @@ class RecommendContainer extends Component {
pageName = 'aFP_Alliance';
}
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}"}}`;
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id": "${collage_activity_id}" ,"collage_price":"${collage_price}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
... ...
... ... @@ -67,6 +67,9 @@ class ShareDetailContainer extends Component {
jumpWithUrl={this._jumpWithUrl}
onEndReached={this._onEndReached}
onPressProduct={this._onPressProduct}
collage_activity_id={this.props.collage_activity_id}
collage_rebates_amount={this.props.collage_rebates_amount}
collage_price={this.props.collage_price}
/>
</View>
)
... ... @@ -87,6 +90,11 @@ class ShareDetailContainer extends Component {
let productSkn = product && product.get('product_skn', 0);
let product_id = product && product.get('product_id', 0);
//拼团需要传递的字段
let collage_activity_id = product && product.get('collage_activity_id', -1);
let collage_price = product && product.get('collage_price', 0);
if (!productSkn) {
return;
}
... ... @@ -96,7 +104,7 @@ class ShareDetailContainer extends Component {
pageName = 'aFP_Alliance';
}
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}"}}`;
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"type":"shareDetail","title":"有赚商品详情", "product_skn":"${productSkn}", "product_id": "${product_id}" ,"from_page_name":"${pageName}", "collage_activity_id":"${collage_activity_id}", "collage_price":"${collage_price}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
... ...