瀏覽代碼

Merge branch 'master' of http://git.ycjcjy.com/shigongli/client-miniapp into master

zlisen 4 年之前
父節點
當前提交
0685516115
共有 5 個檔案被更改,包括 31 行新增11 行删除
  1. 3
    3
      config/dev.js
  2. 1
    0
      config/prod.js
  3. 1
    0
      src/compents/tab/index.jsx
  4. 24
    5
      src/pages/house/list/index.jsx
  5. 2
    3
      src/pages/share/index.jsx

+ 3
- 3
config/dev.js 查看文件

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"',
10
-    HOST: '"http://192.168.211.105:7080"',
9
+    // HOST: '"http://192.168.31.68: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/",
13
     // OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",
13
     // OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",

+ 1
- 0
config/prod.js 查看文件

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

+ 1
- 0
src/compents/tab/index.jsx 查看文件

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}

+ 24
- 5
src/pages/house/list/index.jsx 查看文件

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
   }, [])
80
     getHouseList()
99
     getHouseList()
81
   }, [queryParams])
100
   }, [queryParams])
82
 
101
 
83
-  useDidShow(() => {
84
-    setQueryParams({ ...queryParams })
85
-  })
102
+  // useDidShow(() => {
103
+  //   setQueryParams({ ...queryParams })
104
+  // })
86
 
105
 
87
   return (
106
   return (
88
     <View className='houselist'>
107
     <View className='houselist'>
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}

+ 2
- 3
src/pages/share/index.jsx 查看文件

134
                 <View style={{textAlign: 'center'}}>
134
                 <View style={{textAlign: 'center'}}>
135
                     <Loading size='48px' />
135
                     <Loading size='48px' />
136
                 </View>
136
                 </View>
137
-                <View style={{marginTop: '2em', textAlign: 'center'}}>正在生成分享内容, 请稍...</View>
137
+                <View style={{marginTop: '2em', textAlign: 'center'}}>正在生成分享内容, 请稍...</View>
138
             </AtModalContent>
138
             </AtModalContent>
139
         </AtModal>
139
         </AtModal>
140
         <AtModal isOpened={showShareModal}>
140
         <AtModal isOpened={showShareModal}>
141
             <AtModalHeader>分享到微信</AtModalHeader>
141
             <AtModalHeader>分享到微信</AtModalHeader>
142
             <AtModalAction>
142
             <AtModalAction>
143
-                <Button onClick={() => setShowShareModal(false)}>取消</Button>
144
-                <Button open-type='share' onClick={() => setShowShareModal(false)}>确定</Button>
143
+                <Button open-type='share' onClick={() => setShowShareModal(false)}>去分享</Button>
145
             </AtModalAction>
144
             </AtModalAction>
146
         </AtModal>
145
         </AtModal>
147
     </View>
146
     </View>