...
|
...
|
@@ -7,7 +7,7 @@ import {bindActionCreators} from 'redux'; |
|
|
import {connect} from 'react-redux';
|
|
|
import {Map} from 'immutable';
|
|
|
import * as allianceActions from '../reducers/alliance/allianceActions';
|
|
|
import * as appActions from '../reducers/app/appActions';
|
|
|
import * as appActions from '../reducers/app/appActions';
|
|
|
import Home from '../components/Home'
|
|
|
import LoadingIndicator from '../../common/components/LoadingIndicator';
|
|
|
|
...
|
...
|
@@ -77,18 +77,18 @@ class HomeContainer extends Component { |
|
|
componentDidMount() {
|
|
|
let self = this;
|
|
|
this.props.actions.getResourceInfo(function (json) {
|
|
|
json && json.forEach(item => {
|
|
|
if (item.template_name === 'recommendGoodsGroup' && item.data) {
|
|
|
let productPool = item.data.recommendLogic;
|
|
|
let skns = item.data.skns;
|
|
|
self.props.actions.getProductList(productPool, skns);
|
|
|
let params = {
|
|
|
TAB_ID: '0',
|
|
|
TAB_NAME: '热门推荐'
|
|
|
};
|
|
|
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_CPS_MAIN_PRO_TAB_C', params);
|
|
|
}
|
|
|
})
|
|
|
json && json.forEach(item => {
|
|
|
if (item.template_name === 'recommendGoodsGroup' && item.data) {
|
|
|
let productPool = item.data.recommendLogic;
|
|
|
let skns = item.data.skns;
|
|
|
self.props.actions.getProductList(productPool, skns);
|
|
|
let params = {
|
|
|
TAB_ID: '0',
|
|
|
TAB_NAME: '热门推荐'
|
|
|
};
|
|
|
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_CPS_MAIN_PRO_TAB_C', params);
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
this.props.actions.getInviteCode();
|
|
|
}
|
...
|
...
|
@@ -118,7 +118,7 @@ class HomeContainer extends Component { |
|
|
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
|
|
|
}
|
|
|
|
|
|
_onPressProduct(product) {
|
|
|
_onPressProduct(product, yh_param) {
|
|
|
|
|
|
let productSkn = product && product.get('product_skn', 0);
|
|
|
let product_id = product && product.get('product_id', 0);
|
...
|
...
|
@@ -148,6 +148,8 @@ class HomeContainer extends Component { |
|
|
SKN: product.get('product_skn')
|
|
|
};
|
|
|
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_CPS_MAIN_PRO_C', params);
|
|
|
if (yh_param)
|
|
|
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_CHOOSE_FOR_YOU', yh_param);
|
|
|
}
|
|
|
|
|
|
onPressCategory(data, index) {
|
...
|
...
|
@@ -172,7 +174,7 @@ class HomeContainer extends Component { |
|
|
} = this.props.app;
|
|
|
|
|
|
// _onEndReached 事件会出现在 productPool返回前触发,可能会导致数据不一致,因此控制为0时不调用_onEndReached
|
|
|
if(productPool != 0){
|
|
|
if (productPool != 0) {
|
|
|
this.props.actions.getProductList(productPool, skns);
|
|
|
}
|
|
|
}
|
...
|
...
|
|