张延森 4 лет назад
Родитель
Сommit
4d7ce9409b
4 измененных файлов: 25 добавлений и 4 удалений
  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 Просмотреть файл

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

+ 1
- 0
config/prod.js Просмотреть файл

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

+ 1
- 0
src/compents/tab/index.jsx Просмотреть файл

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

+ 21
- 2
src/pages/house/list/index.jsx Просмотреть файл

@@ -13,7 +13,7 @@ let house = (props, ref) => {
13 13
   const [list, setList] = useState([])
14 14
   const [radioHouse, setRadioHouse] = useState()
15 15
   const [width, setWidth] = useState()
16
-  // const [height, setHeight] = useState()
16
+  const [height, setHeight] = useState()
17 17
   const [queryParams, setQueryParams] = useState({pageNum: 1, pageSize: 10})
18 18
   const [total, setTotal] = useState(0)
19 19
 
@@ -72,6 +72,25 @@ let house = (props, ref) => {
72 72
             // setHeight(res[0].height)
73 73
           }
74 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,7 +109,7 @@ let house = (props, ref) => {
90 109
         (!list || !list.length) && < View className='nodata'> 暂无数据</View>
91 110
       }
92 111
       <RecycleList
93
-        height={508}
112
+        height={height}
94 113
         width={width}
95 114
         list={list}
96 115
         total={total}