Authored by QC-L

添加有赚商品详情分享事件 reveiew by sunkai

import React, { Component } from 'react';
import ReactNative,{ StyleSheet, View, NativeModules ,Dimensions,Platform} from "react-native";
import ReactNative,{ StyleSheet, View, NativeModules, Dimensions, Platform, NativeAppEventEmitter} from "react-native";
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Map } from 'immutable';
... ... @@ -40,6 +40,19 @@ class ShareDetailContainer extends Component {
this._jumpWithUrl = this._jumpWithUrl.bind(this);
this._onEndReached = this._onEndReached.bind(this);
this._onPressProduct = this._onPressProduct.bind(this);
this.subscription = NativeAppEventEmitter.addListener(
'ProductShareDetailEvent',
() => {
let { shareDetail } = this.props;
let shareDetailInfo = shareDetail ? shareDetail.toJS(): {};
let productInfo = shareDetailInfo.productInfo;
if (!productInfo || productInfo == {}) {
return
}
this.showShareView(productInfo);
}
);
}
render() {
... ...