...
|
...
|
@@ -37,7 +37,8 @@ export default class SearchList extends Component { |
|
|
pageTitle: '',
|
|
|
page: {},
|
|
|
productList: {},
|
|
|
stopLoading: {}
|
|
|
stopLoading: {},
|
|
|
destroy: false
|
|
|
};
|
|
|
}
|
|
|
|
...
|
...
|
@@ -96,18 +97,23 @@ export default class SearchList extends Component { |
|
|
});
|
|
|
}
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
let curType = nextProps.filterMenu.curType;
|
|
|
let { productList } = this.state;
|
|
|
console.log(productList);
|
|
|
console.log(curType);
|
|
|
console.log(productList["p_asc"]);
|
|
|
this.getProductData(nextProps.filterMenu);
|
|
|
componentWillReceiveProps(nextProps, oldProps) {
|
|
|
let { destroy } = this.state;
|
|
|
if (!destroy) {
|
|
|
this.getProductData();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
componentDidShow() {
|
|
|
this.getProductData();
|
|
|
}
|
|
|
|
|
|
componentWillUnmount() {
|
|
|
let { clearFilter } = this.props;
|
|
|
clearFilter();
|
|
|
this.setState({
|
|
|
destroy: true
|
|
|
})
|
|
|
}
|
|
|
|
|
|
onScroll(e) {
|
...
|
...
|
|