|
|
|
|
6
|
import { fetch } from '@/utils/request'
|
6
|
import { fetch } from '@/utils/request'
|
7
|
import { API_ITEMS_LIST, API_CITY_AREA, API_ITEMS_TYPE } from '@/constants/api'
|
7
|
import { API_ITEMS_LIST, API_CITY_AREA, API_ITEMS_TYPE } from '@/constants/api'
|
8
|
import ProjectListItem from '@/components/ProjectListItem/index'
|
8
|
import ProjectListItem from '@/components/ProjectListItem/index'
|
|
|
9
|
+import Taro from '@tarojs/taro'
|
9
|
import './index.scss'
|
10
|
import './index.scss'
|
10
|
import FilterForCityArea from './components/FilterForCityArea/index'
|
11
|
import FilterForCityArea from './components/FilterForCityArea/index'
|
11
|
import FilterForPrice from './components/FilterForPrice/index'
|
12
|
import FilterForPrice from './components/FilterForPrice/index'
|
|
|
|
|
82
|
}
|
83
|
}
|
83
|
|
84
|
|
84
|
const GetProjectList = () => { // 获取项目列表
|
85
|
const GetProjectList = () => { // 获取项目列表
|
|
|
86
|
+ Taro.showLoading({title: '加载中'})
|
85
|
setHasNextPage(false)
|
87
|
setHasNextPage(false)
|
86
|
let Data = {}
|
88
|
let Data = {}
|
87
|
for (let key in FilterData) {
|
89
|
for (let key in FilterData) {
|
|
|
|
|
106
|
}
|
108
|
}
|
107
|
fetch({ url: API_ITEMS_LIST, method: 'get', payload: { cityId: city.curCity.id, pageNumber, pageSize, isRecentOpening, isCommerce, ...Data } }).then((res) => {
|
109
|
fetch({ url: API_ITEMS_LIST, method: 'get', payload: { cityId: city.curCity.id, pageNumber, pageSize, isRecentOpening, isCommerce, ...Data } }).then((res) => {
|
108
|
setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
|
110
|
setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
|
|
|
111
|
+ Taro.hideLoading()
|
109
|
setHasNextPage(res.current < res.pages)
|
112
|
setHasNextPage(res.current < res.pages)
|
110
|
setPull(false)
|
113
|
setPull(false)
|
111
|
setCurrentFilter(null)
|
114
|
setCurrentFilter(null)
|