张延森 4 years ago
parent
commit
4d7ce9409b
4 changed files with 25 additions and 4 deletions
  1. 2
    2
      config/dev.js
  2. 1
    0
      config/prod.js
  3. 1
    0
      src/compents/tab/index.jsx
  4. 21
    2
      src/pages/house/list/index.jsx

+ 2
- 2
config/dev.js View File

4
     NODE_ENV: '"development"'
4
     NODE_ENV: '"development"'
5
   },
5
   },
6
   defineConstants: {
6
   defineConstants: {
7
-    // HOST: '"http://localhost:7080"',
7
+    HOST: '"http://localhost:7080"',
8
     // HOST: '"https://sgl.ycjcjy.com"',
8
     // HOST: '"https://sgl.ycjcjy.com"',
9
-    HOST: '"http://192.168.31.68:7080"',
9
+    // HOST: '"http://192.168.31.68:7080"',
10
     // HOST: '"http://192.168.211.181:7080"',
10
     // HOST: '"http://192.168.211.181:7080"',
11
  
11
  
12
     // OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
12
     // OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",

+ 1
- 0
config/prod.js View File

3
     NODE_ENV: '"production"'
3
     NODE_ENV: '"production"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
+    HOST: '"https://sgl.ycjcjy.com"'
6
   },
7
   },
7
   mini: {},
8
   mini: {},
8
   h5: {
9
   h5: {

+ 1
- 0
src/compents/tab/index.jsx View File

28
     useEffect(() => {
28
     useEffect(() => {
29
 
29
 
30
     }, [])
30
     }, [])
31
+    
31
     //  &-on{
32
     //  &-on{
32
     //     color: #fed12f;
33
     //     color: #fed12f;
33
     // }${props.className}
34
     // }${props.className}

+ 21
- 2
src/pages/house/list/index.jsx View File

13
   const [list, setList] = useState([])
13
   const [list, setList] = useState([])
14
   const [radioHouse, setRadioHouse] = useState()
14
   const [radioHouse, setRadioHouse] = useState()
15
   const [width, setWidth] = useState()
15
   const [width, setWidth] = useState()
16
-  // const [height, setHeight] = useState()
16
+  const [height, setHeight] = useState()
17
   const [queryParams, setQueryParams] = useState({pageNum: 1, pageSize: 10})
17
   const [queryParams, setQueryParams] = useState({pageNum: 1, pageSize: 10})
18
   const [total, setTotal] = useState(0)
18
   const [total, setTotal] = useState(0)
19
 
19
 
72
             // setHeight(res[0].height)
72
             // setHeight(res[0].height)
73
           }
73
           }
74
         }).exec()
74
         }).exec()
75
+        
76
+      Taro.createSelectorQuery()
77
+        .selectAll('.tab')
78
+        .boundingClientRect(res => {
79
+          let found = false
80
+          if (res) {
81
+            for (let item of res) {
82
+              if (item.height) {
83
+                found = true
84
+                setHeight(Taro.getSystemInfoSync().safeArea.height - item.height - 50)
85
+                break
86
+              }
87
+            }
88
+          }
89
+
90
+          if (!found) {
91
+            setHeight(500)
92
+          }
93
+        }).exec()
75
     })
94
     })
76
 
95
 
77
   }, [])
96
   }, [])
90
         (!list || !list.length) && < View className='nodata'> 暂无数据</View>
109
         (!list || !list.length) && < View className='nodata'> 暂无数据</View>
91
       }
110
       }
92
       <RecycleList
111
       <RecycleList
93
-        height={508}
112
+        height={height}
94
         width={width}
113
         width={width}
95
         list={list}
114
         list={list}
96
         total={total}
115
         total={total}