...
|
...
|
@@ -86,14 +86,17 @@ class HomeContainer extends Component { |
|
|
this.props.actions.getResourceInfo(function (json) {
|
|
|
json && json.forEach((item,index) => {
|
|
|
if (item.template_name === 'recommendGoodsGroup' && item.data) {
|
|
|
let productPool = item.data.recommendLogic;
|
|
|
let recommendLogic = item.data.recommendLogic;
|
|
|
let recommendLogicJson = JSON.parse(recommendLogic);
|
|
|
let productPool = recommendLogicJson.productPool;
|
|
|
let order = recommendLogicJson.order;
|
|
|
let skns = item.data.skns;
|
|
|
self.setState({
|
|
|
F_NAME: item.template_name,
|
|
|
F_ID: item.template_id,
|
|
|
F_INDEX: index+1
|
|
|
})
|
|
|
self.props.actions.getProductList(productPool, skns);
|
|
|
self.props.actions.getProductList(productPool, skns,0, order);
|
|
|
let params = {
|
|
|
TAB_ID: '0',
|
|
|
TAB_NAME: '热门推荐'
|
...
|
...
|
@@ -187,6 +190,7 @@ class HomeContainer extends Component { |
|
|
let {
|
|
|
productPool,
|
|
|
skns,
|
|
|
order,
|
|
|
} = this.props.app;
|
|
|
|
|
|
// _onEndReached 事件会出现在 productPool返回前触发,可能会导致数据不一致,因此控制为0时不调用_onEndReached
|
...
|
...
|
@@ -196,9 +200,9 @@ class HomeContainer extends Component { |
|
|
|
|
|
let data = this.state.categoryData;
|
|
|
if (data) {
|
|
|
this.props.actions.getProductList(productPool, skns,data.get('sort_id'));
|
|
|
this.props.actions.getProductList(productPool, skns,data.get('sort_id'),order);
|
|
|
} else {
|
|
|
this.props.actions.getProductList(productPool, skns);
|
|
|
this.props.actions.getProductList(productPool, skns,0, order);
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|