Authored by Yincheng

好货详情收藏按钮进行监听

reviewed by gaijianqiu
... ... @@ -49,6 +49,13 @@ class DetailContainer extends Component {
this._onPressProduct = this._onPressProduct.bind(this);
this._onPressFavorite = this._onPressFavorite.bind(this);
this._onPressTag = this._onPressTag.bind(this);
this.subscription = NativeAppEventEmitter.addListener(
'ProductFavoriteStatusChangedEvent',
(reminder) => {
this.props.actions.setFavoriteStatus(reminder.status);
}
);
}
componentDidMount() {
... ... @@ -57,7 +64,7 @@ class DetailContainer extends Component {
}
componentWillUnmount() {
this.subscription && this.subscription.remove();
}
_onPressProduct(product, index) {
... ...