...
|
...
|
@@ -75,6 +75,10 @@ class HomeContainer extends Component { |
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.state = {
|
|
|
categoryData:null
|
|
|
}
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
...
|
...
|
@@ -167,6 +171,10 @@ class HomeContainer extends Component { |
|
|
} = this.props.app;
|
|
|
this.props.actions.setAppSelectedCategory(productPool, skns, data.get('sort_id'), data.get('sort_name'), index);
|
|
|
|
|
|
this.setState({
|
|
|
categoryData:data
|
|
|
})
|
|
|
|
|
|
let params = {
|
|
|
TAB_ID: data.get('sort_id'),
|
|
|
TAB_NAME: data.get('sort_name')
|
...
|
...
|
@@ -181,10 +189,17 @@ class HomeContainer extends Component { |
|
|
skns,
|
|
|
} = this.props.app;
|
|
|
|
|
|
// _onEndReached 事件会出现在 productPool返回前触发,可能会导致数据不一致,因此控制为0时不调用_onEndReached
|
|
|
// _onEndReached 事件会出现在 productPool返回前触发,可能会导致数据不一致,因此控制为0时不调用_onEndReached
|
|
|
if (productPool != 0) {
|
|
|
this.props.actions.getProductList(productPool, skns);
|
|
|
}
|
|
|
|
|
|
let data = this.state.categoryData;
|
|
|
if (data) {
|
|
|
this.props.actions.getProductList(productPool, skns,data.get('sort_id'));
|
|
|
} else {
|
|
|
this.props.actions.getProductList(productPool, skns);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
render() {
|
...
|
...
|
|