ソースを参照

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,10 +4,10 @@ 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"',
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 12
     // OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
13 13
     // OSS_FAST_PATH: "https://njcj.oss-accelerate.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.njyunzhi.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}

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

+ 2
- 3
src/pages/share/index.jsx ファイルの表示

@@ -134,14 +134,13 @@ const Index = () => {
134 134
                 <View style={{textAlign: 'center'}}>
135 135
                     <Loading size='48px' />
136 136
                 </View>
137
-                <View style={{marginTop: '2em', textAlign: 'center'}}>正在生成分享内容, 请稍...</View>
137
+                <View style={{marginTop: '2em', textAlign: 'center'}}>正在生成分享内容, 请稍...</View>
138 138
             </AtModalContent>
139 139
         </AtModal>
140 140
         <AtModal isOpened={showShareModal}>
141 141
             <AtModalHeader>分享到微信</AtModalHeader>
142 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 144
             </AtModalAction>
146 145
         </AtModal>
147 146
     </View>