|
@@ -13,7 +13,9 @@ import FilterForHouseType from './components/FilterForHouseType/index'
|
13
|
13
|
import FilterForMore from './components/FilterForMore/index'
|
14
|
14
|
import FilterForHouseSort from './components/FilterForHouseSort/index'
|
15
|
15
|
|
16
|
|
-export default withLayout(() => {
|
|
16
|
+export default withLayout((props) => {
|
|
17
|
+ const { router } = props
|
|
18
|
+ const { isRecentOpening } = router.params
|
17
|
19
|
|
18
|
20
|
const city = useSelector(state => state.city)
|
19
|
21
|
const [PageList, setPageList] = useState([])
|
|
@@ -87,7 +89,7 @@ export default withLayout(() => {
|
87
|
89
|
Data[key] = FilterData[key]
|
88
|
90
|
}
|
89
|
91
|
}
|
90
|
|
- fetch({ url: API_ITEMS_LIST, method: 'get', payload: { cityId: city.curCity.id, pageNumber, pageSize, ...Data } }).then((res) => {
|
|
92
|
+ fetch({ url: API_ITEMS_LIST, method: 'get', payload: { cityId: city.curCity.id, pageNumber, pageSize, isRecentOpening, ...Data } }).then((res) => {
|
91
|
93
|
setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
|
92
|
94
|
setHasNextPage(res.current < res.pages)
|
93
|
95
|
setPull(false)
|