Authored by 陈林

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

... ... @@ -110,7 +110,7 @@ export default class InvitedFriends extends Component {
}}/>
<TouchableOpacity activeOpacity={1} style={styles.touchableStyle} onPress={() => {
//有货有赚调原生
this.props.shareForInvite && this.props.shareForInvite();
}}>
<Text style={styles.buttonStyle}>邀请好友加入有货有赚</Text>
</TouchableOpacity>
... ...
'use strict';
import React, { Component } from 'react';
import { StyleSheet, View } from "react-native";
import ReactNative, { StyleSheet, View } from "react-native";
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Map } from 'immutable';
... ... @@ -51,6 +51,10 @@ class InvitedFriendsContainer extends Component {
this.props.actions.getInvitedFriends();
}
_shareForInvite() {
ReactNative.NativeModules.YH_CommonHelper.shareCpsInvite();
}
render() {
let {invitedFriendsList} = this.props.alliance;
let isFetching = invitedFriendsList.isFetching;
... ... @@ -58,7 +62,8 @@ class InvitedFriendsContainer extends Component {
<View style={styles.container}>
<InvitedFriends
invitedFriendsList={invitedFriendsList}
onEndReached={this._onEndReached}/>
onEndReached={this._onEndReached}
shareForInvite={this._shareForInvite}/>
<LoadingIndicator isVisible={isFetching}/>
</View>
)
... ...