Authored by 张文文

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

@@ -115,7 +115,8 @@ export default function native(platform) { @@ -115,7 +115,8 @@ export default function native(platform) {
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} 117 collage_activity_id={this.props.collage_activity_id}
118 - collage_price={this.props.collage_price}/> 118 + collage_price={this.props.collage_price}
  119 + collage_rebates_amount={this.props.collage_rebates_amount}/>
119 </Provider> 120 </Provider>
120 ); 121 );
121 } else if (type === 'recommendProduct') { 122 } else if (type === 'recommendProduct') {
@@ -24,6 +24,7 @@ export default class ShareDetail extends Component { @@ -24,6 +24,7 @@ export default class ShareDetail extends Component {
24 } 24 }
25 25
26 _renderBottom(productInfo,isCollect) { 26 _renderBottom(productInfo,isCollect) {
  27 + let rebatesPrice = this.props.collage_activity_id && this.props.collage_activity_id != -1 ? this.props.collage_rebates_amount : productInfo.rebatesAmount;
27 return ( 28 return (
28 <View style={styles.bottomBar}> 29 <View style={styles.bottomBar}>
29 <View style={[styles.favContainer, styles.center]}> 30 <View style={[styles.favContainer, styles.center]}>
@@ -43,7 +44,7 @@ export default class ShareDetail extends Component { @@ -43,7 +44,7 @@ export default class ShareDetail extends Component {
43 </TouchableOpacity> 44 </TouchableOpacity>
44 <TouchableOpacity activeOpacity={0.8} onPress={() => this.props.showShareView(productInfo)}> 45 <TouchableOpacity activeOpacity={0.8} onPress={() => this.props.showShareView(productInfo)}>
45 <View style={[styles.button, styles.center, styles.red]}> 46 <View style={[styles.button, styles.center, styles.red]}>
46 - <Text style={styles.btnText}>{'分享可赚¥' + productInfo.rebatesAmount}</Text> 47 + <Text style={styles.btnText}>{'分享可赚¥' + rebatesPrice}</Text>
47 </View> 48 </View>
48 </TouchableOpacity> 49 </TouchableOpacity>
49 </View> 50 </View>
@@ -17,9 +17,9 @@ export default class ProductCell extends Component { @@ -17,9 +17,9 @@ export default class ProductCell extends Component {
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 18
19 let activityId = data.get('collage_activity_id'); 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; 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;
23 return ( 23 return (
24 <View> 24 <View>
25 <View style={styles.fatherContainer}> 25 <View style={styles.fatherContainer}>
@@ -133,6 +133,7 @@ class HomeContainer extends Component { @@ -133,6 +133,7 @@ class HomeContainer extends Component {
133 //拼团需要传递的字段 133 //拼团需要传递的字段
134 let collage_activity_id = product && product.get('collage_activity_id', -1); 134 let collage_activity_id = product && product.get('collage_activity_id', -1);
135 let collage_price = product && product.get('collage_price', 0); 135 let collage_price = product && product.get('collage_price', 0);
  136 + let collage_rebates_amount = product && product.get('collage_rebates_amount', 0);
136 137
137 if (!productSkn) { 138 if (!productSkn) {
138 return; 139 return;
@@ -143,7 +144,7 @@ class HomeContainer extends Component { @@ -143,7 +144,7 @@ class HomeContainer extends Component {
143 pageName = 'aFP_Alliance'; 144 pageName = 'aFP_Alliance';
144 } 145 }
145 146
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}"}}`; 147 + 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}"}}`;
147 148
148 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url); 149 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
149 150
@@ -78,6 +78,7 @@ class RecommendContainer extends Component { @@ -78,6 +78,7 @@ class RecommendContainer extends Component {
78 //拼团需要传递的字段 78 //拼团需要传递的字段
79 let collage_activity_id = product && product.get('collage_activity_id', -1); 79 let collage_activity_id = product && product.get('collage_activity_id', -1);
80 let collage_price = product && product.get('collage_price', 0); 80 let collage_price = product && product.get('collage_price', 0);
  81 + let collage_rebates_amount = product && product.get('collage_rebates_amount', 0);
81 82
82 if (!productSkn) { 83 if (!productSkn) {
83 return; 84 return;
@@ -88,7 +89,7 @@ class RecommendContainer extends Component { @@ -88,7 +89,7 @@ class RecommendContainer extends Component {
88 pageName = 'aFP_Alliance'; 89 pageName = 'aFP_Alliance';
89 } 90 }
90 91
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}"}}`; 92 + 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}"}}`;
92 93
93 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url); 94 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
94 } 95 }
@@ -94,6 +94,7 @@ class ShareDetailContainer extends Component { @@ -94,6 +94,7 @@ class ShareDetailContainer extends Component {
94 //拼团需要传递的字段 94 //拼团需要传递的字段
95 let collage_activity_id = product && product.get('collage_activity_id', -1); 95 let collage_activity_id = product && product.get('collage_activity_id', -1);
96 let collage_price = product && product.get('collage_price', 0); 96 let collage_price = product && product.get('collage_price', 0);
  97 + let collage_rebates_amount = product && product.get('collage_rebates_amount', 0);
97 98
98 if (!productSkn) { 99 if (!productSkn) {
99 return; 100 return;
@@ -104,7 +105,7 @@ class ShareDetailContainer extends Component { @@ -104,7 +105,7 @@ class ShareDetailContainer extends Component {
104 pageName = 'aFP_Alliance'; 105 pageName = 'aFP_Alliance';
105 } 106 }
106 107
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}"}}`; 108 + 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}"}}`;
108 109
109 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url); 110 ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
110 } 111 }