Authored by 张文文

显示拼团价信息

@@ -113,7 +113,9 @@ export default function native(platform) { @@ -113,7 +113,9 @@ export default function native(platform) {
113 <Provider store={store}> 113 <Provider store={store}>
114 <ShareDetailContainer 114 <ShareDetailContainer
115 product_skn={this.props.product_skn} 115 product_skn={this.props.product_skn}
116 - product_id={this.props.product_id}/> 116 + product_id={this.props.product_id}
  117 + collage_activity_id={this.props.collage_activity_id}
  118 + collage_price={this.props.collage_price}/>
117 </Provider> 119 </Provider>
118 ); 120 );
119 } else if (type === 'recommendProduct') { 121 } else if (type === 'recommendProduct') {
@@ -135,7 +137,7 @@ export default function native(platform) { @@ -135,7 +137,7 @@ export default function native(platform) {
135 } else if (type === 'estimateDetails') { 137 } else if (type === 'estimateDetails') {
136 return ( 138 return (
137 <Provider store={store}> 139 <Provider store={store}>
138 - <EstimateDetailContainer 140 + <EstimateDetailContainer
139 time_type={this.props.time_type} 141 time_type={this.props.time_type}
140 tab_type={this.props.tab_type}/> 142 tab_type={this.props.tab_type}/>
141 </Provider> 143 </Provider>
@@ -84,6 +84,10 @@ export default class ShareDetail extends Component { @@ -84,6 +84,10 @@ export default class ShareDetail extends Component {
84 let imgList = goodsImagesList && goodsImagesList.map(item => ({src: item.imageUrl})); 84 let imgList = goodsImagesList && goodsImagesList.map(item => ({src: item.imageUrl}));
85 imgList = Immutable.fromJS(imgList); 85 imgList = Immutable.fromJS(imgList);
86 86
  87 + let activityId = this.props.collage_activity_id;
  88 + let salesPrice = activityId && activityId != -1 ? this.props.collage_price : productPriceBo.salesPrice;
  89 + let groupWidth = activityId && activityId != -1 ? 50 : 0;
  90 +
87 return ( 91 return (
88 <View> 92 <View>
89 <View style={[styles.imgContainer]}> 93 <View style={[styles.imgContainer]}>
@@ -101,6 +105,7 @@ export default class ShareDetail extends Component { @@ -101,6 +105,7 @@ export default class ShareDetail extends Component {
101 <Text style={styles.price}>{productPriceBo.salesPrice}</Text> 105 <Text style={styles.price}>{productPriceBo.salesPrice}</Text>
102 {productPriceBo.salesPrice !== productPriceBo.marketPrice && <Text style={styles.origpriceUnit}></Text>} 106 {productPriceBo.salesPrice !== productPriceBo.marketPrice && <Text style={styles.origpriceUnit}></Text>}
103 {productPriceBo.salesPrice !== productPriceBo.marketPrice && <Text style={styles.origPrice}>{productPriceBo.marketPrice}</Text>} 107 {productPriceBo.salesPrice !== productPriceBo.marketPrice && <Text style={styles.origPrice}>{productPriceBo.marketPrice}</Text>}
  108 + <Image source={require('../images/Group3.png')} style={{marginLeft: 10, height: 17, width: groupWidth}} />
104 </View> 109 </View>
105 </View> 110 </View>
106 </View> 111 </View>
1 'use strict'; 1 'use strict';
2 2
3 import React, {Component} from 'react'; 3 import React, {Component} from 'react';
4 -import {Dimensions, StyleSheet, Text, TouchableOpacity, View} from 'react-native'; 4 +import {Dimensions, StyleSheet, Text, TouchableOpacity, View, Image} from 'react-native';
5 5
6 import YH_Image from '../../../common/components/YH_Image'; 6 import YH_Image from '../../../common/components/YH_Image';
7 7
@@ -15,6 +15,11 @@ export default class ProductCell extends Component { @@ -15,6 +15,11 @@ export default class ProductCell extends Component {
15 let data = this.props.data; 15 let data = this.props.data;
16 let prdImage = YH_Image.getSlicedUrl(data.get('default_images', ''), 80, 109, 2); 16 let prdImage = YH_Image.getSlicedUrl(data.get('default_images', ''), 80, 109, 2);
17 let yh_exposureData = this.props.yh_exposureData ? this.props.yh_exposureData : null; 17 let yh_exposureData = this.props.yh_exposureData ? this.props.yh_exposureData : null;
  18 +
  19 + let activityId = data.get('collage_activity_id');
  20 + let salesPrice = activityId && activityId != 0 ? data.get('collage_price') : data.get('sales_price');
  21 + let rebatesPrice = activityId && activityId != 0 ? data.get('collage_rebates_amount') : data.get('rebates_amount');
  22 + let groupWidth = activityId && activityId != 0 ? 50 : 0;
18 return ( 23 return (
19 <View> 24 <View>
20 <View style={styles.fatherContainer}> 25 <View style={styles.fatherContainer}>
@@ -27,14 +32,15 @@ export default class ProductCell extends Component { @@ -27,14 +32,15 @@ export default class ProductCell extends Component {
27 <YH_Image style={styles.prdImage} url={prdImage}/> 32 <YH_Image style={styles.prdImage} url={prdImage}/>
28 <Text style={styles.prdName} numberOfLines={2}>{data.get('product_name', '')}</Text> 33 <Text style={styles.prdName} numberOfLines={2}>{data.get('product_name', '')}</Text>
29 <View style={styles.priceContainer}> 34 <View style={styles.priceContainer}>
30 - <Text style={styles.nowPrice} numberOfLines={1}>¥{data.get('sales_price')}</Text> 35 + <Text style={styles.nowPrice} numberOfLines={1}>¥{salesPrice}</Text>
  36 + <Image source={require('../../images/Group3.png')} style={{marginLeft: 10, height: 17, width: groupWidth}} />
31 </View> 37 </View>
32 <View style={[styles.bottomView, styles.returnTextContainer]}> 38 <View style={[styles.bottomView, styles.returnTextContainer]}>
33 <Text style={styles.returnText}>最高返</Text> 39 <Text style={styles.returnText}>最高返</Text>
34 <Text style={[styles.returnText, { 40 <Text style={[styles.returnText, {
35 marginLeft: 4, 41 marginLeft: 4,
36 fontSize: 16 42 fontSize: 16
37 - }]}>¥{data.get('rebates_amount')}</Text> 43 + }]}>¥{rebatesPrice}</Text>
38 </View> 44 </View>
39 <View style={styles.shareContainer}> 45 <View style={styles.shareContainer}>
40 <Text style={styles.share}>去分享</Text> 46 <Text style={styles.share}>去分享</Text>
@@ -129,6 +129,11 @@ class HomeContainer extends Component { @@ -129,6 +129,11 @@ class HomeContainer extends Component {
129 129
130 let productSkn = product && product.get('product_skn', 0); 130 let productSkn = product && product.get('product_skn', 0);
131 let product_id = product && product.get('product_id', 0); 131 let product_id = product && product.get('product_id', 0);
  132 +
  133 + //拼团需要传递的字段
  134 + let collage_activity_id = product && product.get('collage_activity_id', -1);
  135 + let collage_price = product && product.get('collage_price', 0);
  136 +
132 if (!productSkn) { 137 if (!productSkn) {
133 return; 138 return;
134 } 139 }
@@ -138,7 +143,7 @@ class HomeContainer extends Component { @@ -138,7 +143,7 @@ class HomeContainer extends Component {
138 pageName = 'aFP_Alliance'; 143 pageName = 'aFP_Alliance';
139 } 144 }
140 145
141 - 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}"}}`; 146 + 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}"}}`;
142 147
143 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url); 148 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
144 149
@@ -74,6 +74,11 @@ class RecommendContainer extends Component { @@ -74,6 +74,11 @@ class RecommendContainer extends Component {
74 onPressProduct(product) { 74 onPressProduct(product) {
75 let productSkn = product && product.get('product_skn', 0); 75 let productSkn = product && product.get('product_skn', 0);
76 let product_id = product && product.get('product_id', 0); 76 let product_id = product && product.get('product_id', 0);
  77 +
  78 + //拼团需要传递的字段
  79 + let collage_activity_id = product && product.get('collage_activity_id', -1);
  80 + let collage_price = product && product.get('collage_price', 0);
  81 +
77 if (!productSkn) { 82 if (!productSkn) {
78 return; 83 return;
79 } 84 }
@@ -83,7 +88,7 @@ class RecommendContainer extends Component { @@ -83,7 +88,7 @@ class RecommendContainer extends Component {
83 pageName = 'aFP_Alliance'; 88 pageName = 'aFP_Alliance';
84 } 89 }
85 90
86 - 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}"}}`; 91 + 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}"}}`;
87 92
88 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url); 93 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
89 } 94 }
@@ -67,6 +67,9 @@ class ShareDetailContainer extends Component { @@ -67,6 +67,9 @@ class ShareDetailContainer extends Component {
67 jumpWithUrl={this._jumpWithUrl} 67 jumpWithUrl={this._jumpWithUrl}
68 onEndReached={this._onEndReached} 68 onEndReached={this._onEndReached}
69 onPressProduct={this._onPressProduct} 69 onPressProduct={this._onPressProduct}
  70 + collage_activity_id={this.props.collage_activity_id}
  71 + collage_rebates_amount={this.props.collage_rebates_amount}
  72 + collage_price={this.props.collage_price}
70 /> 73 />
71 </View> 74 </View>
72 ) 75 )
@@ -87,6 +90,11 @@ class ShareDetailContainer extends Component { @@ -87,6 +90,11 @@ class ShareDetailContainer extends Component {
87 90
88 let productSkn = product && product.get('product_skn', 0); 91 let productSkn = product && product.get('product_skn', 0);
89 let product_id = product && product.get('product_id', 0); 92 let product_id = product && product.get('product_id', 0);
  93 +
  94 + //拼团需要传递的字段
  95 + let collage_activity_id = product && product.get('collage_activity_id', -1);
  96 + let collage_price = product && product.get('collage_price', 0);
  97 +
90 if (!productSkn) { 98 if (!productSkn) {
91 return; 99 return;
92 } 100 }
@@ -96,7 +104,7 @@ class ShareDetailContainer extends Component { @@ -96,7 +104,7 @@ class ShareDetailContainer extends Component {
96 pageName = 'aFP_Alliance'; 104 pageName = 'aFP_Alliance';
97 } 105 }
98 106
99 - 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}"}}`; 107 + 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}"}}`;
100 108
101 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url); 109 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
102 } 110 }