1002884655 пре 3 година
родитељ
комит
27ccf85fc3
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3
    0
      src/pages/index/buildingList/index.jsx

+ 3
- 0
src/pages/index/buildingList/index.jsx Прегледај датотеку

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