Authored by 张文文

商品详情页分享可赚显示最高返

... ... @@ -115,7 +115,8 @@ export default function native(platform) {
product_skn={this.props.product_skn}
product_id={this.props.product_id}
collage_activity_id={this.props.collage_activity_id}
collage_price={this.props.collage_price}/>
collage_price={this.props.collage_price}
collage_rebates_amount={this.props.collage_rebates_amount}/>
</Provider>
);
} else if (type === 'recommendProduct') {
... ...
... ... @@ -24,6 +24,7 @@ export default class ShareDetail extends Component {
}
_renderBottom(productInfo,isCollect) {
let rebatesPrice = this.props.collage_activity_id && this.props.collage_activity_id != -1 ? this.props.collage_rebates_amount : productInfo.rebatesAmount;
return (
<View style={styles.bottomBar}>
<View style={[styles.favContainer, styles.center]}>
... ... @@ -43,7 +44,7 @@ export default class ShareDetail extends Component {
</TouchableOpacity>
<TouchableOpacity activeOpacity={0.8} onPress={() => this.props.showShareView(productInfo)}>
<View style={[styles.button, styles.center, styles.red]}>
<Text style={styles.btnText}>{'分享可赚¥' + productInfo.rebatesAmount}</Text>
<Text style={styles.btnText}>{'分享可赚¥' + rebatesPrice}</Text>
</View>
</TouchableOpacity>
</View>
... ...
... ... @@ -17,9 +17,9 @@ export default class ProductCell extends Component {
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;
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}>
... ...
... ... @@ -133,6 +133,7 @@ class HomeContainer extends Component {
//拼团需要传递的字段
let collage_activity_id = product && product.get('collage_activity_id', -1);
let collage_price = product && product.get('collage_price', 0);
let collage_rebates_amount = product && product.get('collage_rebates_amount', 0);
if (!productSkn) {
return;
... ... @@ -143,7 +144,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}", "collage_activity_id":"${collage_activity_id}", "collage_price":"${collage_price}"}}`;
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}", "collage_rebates_amount":"${collage_rebates_amount}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
... ...
... ... @@ -78,6 +78,7 @@ class RecommendContainer extends Component {
//拼团需要传递的字段
let collage_activity_id = product && product.get('collage_activity_id', -1);
let collage_price = product && product.get('collage_price', 0);
let collage_rebates_amount = product && product.get('collage_rebates_amount', 0);
if (!productSkn) {
return;
... ... @@ -88,7 +89,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}", "collage_activity_id": "${collage_activity_id}" ,"collage_price":"${collage_price}"}}`;
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}", "collage_rebates_amount":"${collage_rebates_amount}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
... ...
... ... @@ -94,6 +94,7 @@ class ShareDetailContainer extends Component {
//拼团需要传递的字段
let collage_activity_id = product && product.get('collage_activity_id', -1);
let collage_price = product && product.get('collage_price', 0);
let collage_rebates_amount = product && product.get('collage_rebates_amount', 0);
if (!productSkn) {
return;
... ... @@ -104,7 +105,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}", "collage_activity_id":"${collage_activity_id}", "collage_price":"${collage_price}"}}`;
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}", "collage_rebates_amount":"${collage_rebates_amount}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
... ...