Authored by 陈林

增加分享调用方法。review by 张文文。

@@ -110,7 +110,7 @@ export default class InvitedFriends extends Component { @@ -110,7 +110,7 @@ export default class InvitedFriends extends Component {
110 }}/> 110 }}/>
111 111
112 <TouchableOpacity activeOpacity={1} style={styles.touchableStyle} onPress={() => { 112 <TouchableOpacity activeOpacity={1} style={styles.touchableStyle} onPress={() => {
113 - //有货有赚调原生 113 + this.props.shareForInvite && this.props.shareForInvite();
114 }}> 114 }}>
115 <Text style={styles.buttonStyle}>邀请好友加入有货有赚</Text> 115 <Text style={styles.buttonStyle}>邀请好友加入有货有赚</Text>
116 </TouchableOpacity> 116 </TouchableOpacity>
1 'use strict'; 1 'use strict';
2 2
3 import React, { Component } from 'react'; 3 import React, { Component } from 'react';
4 -import { StyleSheet, View } from "react-native"; 4 +import ReactNative, { StyleSheet, View } from "react-native";
5 import { bindActionCreators } from 'redux'; 5 import { bindActionCreators } from 'redux';
6 import { connect } from 'react-redux'; 6 import { connect } from 'react-redux';
7 import { Map } from 'immutable'; 7 import { Map } from 'immutable';
@@ -51,6 +51,10 @@ class InvitedFriendsContainer extends Component { @@ -51,6 +51,10 @@ class InvitedFriendsContainer extends Component {
51 this.props.actions.getInvitedFriends(); 51 this.props.actions.getInvitedFriends();
52 } 52 }
53 53
  54 + _shareForInvite() {
  55 + ReactNative.NativeModules.YH_CommonHelper.shareCpsInvite();
  56 + }
  57 +
54 render() { 58 render() {
55 let {invitedFriendsList} = this.props.alliance; 59 let {invitedFriendsList} = this.props.alliance;
56 let isFetching = invitedFriendsList.isFetching; 60 let isFetching = invitedFriendsList.isFetching;
@@ -58,7 +62,8 @@ class InvitedFriendsContainer extends Component { @@ -58,7 +62,8 @@ class InvitedFriendsContainer extends Component {
58 <View style={styles.container}> 62 <View style={styles.container}>
59 <InvitedFriends 63 <InvitedFriends
60 invitedFriendsList={invitedFriendsList} 64 invitedFriendsList={invitedFriendsList}
61 - onEndReached={this._onEndReached}/> 65 + onEndReached={this._onEndReached}
  66 + shareForInvite={this._shareForInvite}/>
62 <LoadingIndicator isVisible={isFetching}/> 67 <LoadingIndicator isVisible={isFetching}/>
63 </View> 68 </View>
64 ) 69 )