Authored by QC-L

更新消息列表展示,修复数据无限刷新的 bug review by 黄敬囿

... ... @@ -19,11 +19,10 @@
}
.no-data .no-data-btn {
margin-top: 20rpx;
margin-top: 100rpx;
line-height: 88rpx;
color: #fff;
text-align: center;
background-color: #000;
border-radius: 20rpx;
width: 300rpx;
background-color: #002B47;
width: 600rpx;
}
\ No newline at end of file
... ...
... ... @@ -103,6 +103,5 @@
color: #999;
font-size: 30rpx;
letter-spacing: 0.8px;
margin-top: 300rpx;
height: 80%;
margin-top: 200rpx;
}
\ No newline at end of file
... ...
... ... @@ -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) {
... ...