Browse Source

静态页面

1002884655 3 years ago
parent
commit
babcb43aab

+ 2
- 2
config/dev.js View File

3
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    HOST: '"https://xlk.njyz.tech"',
7
-    // HOST: '"https://www.newhousehold.cn"',
6
+    // HOST: '"https://xlk.njyz.tech"',
7
+    HOST: '"https://www.newhousehold.cn"',
8
     // HOST: '"http://127.0.0.1:8567"',
8
     // HOST: '"http://127.0.0.1:8567"',
9
     WSS_HOST: '"wss://xlk.njyz.tech"',
9
     WSS_HOST: '"wss://xlk.njyz.tech"',
10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',

+ 24
- 13
src/pages/index/helpToFindHouse/components/SubmitBuyHouseResult/index.jsx View File

1
 
1
 
2
 import { useState } from 'react'
2
 import { useState } from 'react'
3
 import Taro from '@tarojs/taro'
3
 import Taro from '@tarojs/taro'
4
-import { Image, Block } from '@tarojs/components'
4
+import { Image, Block, ScrollView } from '@tarojs/components'
5
 import { getImgURL } from '@/utils/image'
5
 import { getImgURL } from '@/utils/image'
6
+import ProjectItemCard from '@/components/ProjectItemCard/index'
6
 import '@/assets/css/iconfont.css'
7
 import '@/assets/css/iconfont.css'
7
 import './index.scss'
8
 import './index.scss'
8
 
9
 
53
                     <text>匹配楼盘</text>
54
                     <text>匹配楼盘</text>
54
                   </view>
55
                   </view>
55
                 </view>
56
                 </view>
56
-                <view className='RecommendBuildingItem' onClick={() => {Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${List[0].buildingId}` })}}>
57
-                  <view>
58
-                    <view className='Img'>
59
-                      <Image mode='aspectFill' src={getImgURL(List[0].poster || List[0].preSalePermit)} className='centerLabel'></Image>
60
-                    </view>
61
-                    <view className='Title flex-h'>
62
-                      <view className='flex-item'>
63
-                        <text>{List[0].name}</text>
64
-                      </view>
65
-                      <view className='Price'><text>{List[0].price}</text></view>
57
+                <view className={List.length === 1 ? 'ScrollViewX active' : 'ScrollViewX'}>
58
+                  <ScrollView scrollX>
59
+                    <view className='ListContainer'>
60
+                      {
61
+                        List.map((item, index) => (
62
+                          <view className='RecommendBuildingItem' key={`item-${index}`} onClick={() => { Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${item.buildingId}` }) }}>
63
+                            <view>
64
+                              <view className='Img'>
65
+                                <Image mode='aspectFill' src={getImgURL(item.poster || item.preSalePermit)} className='centerLabel'></Image>
66
+                              </view>
67
+                              <view className='Title flex-h'>
68
+                                <view className='flex-item'>
69
+                                  <text>{item.name}</text>
70
+                                </view>
71
+                                <view className='Price'><text>{item.price}</text></view>
72
+                              </view>
73
+                              <text className='Address'>{item.address}</text>
74
+                            </view>
75
+                          </view>
76
+                        ))
77
+                      }
66
                     </view>
78
                     </view>
67
-                    <text className='Address'>{List[0].address}</text>
68
-                  </view>
79
+                  </ScrollView>
69
                 </view>
80
                 </view>
70
               </view>
81
               </view>
71
             }
82
             }

+ 104
- 78
src/pages/index/helpToFindHouse/components/SubmitBuyHouseResult/index.scss View File

8
   margin: 0 !important;
8
   margin: 0 !important;
9
   padding: 0 !important;
9
   padding: 0 !important;
10
   z-index: 100 !important;
10
   z-index: 100 !important;
11
-  >view {
11
+  > view {
12
     width: 100%;
12
     width: 100%;
13
-    >view {
13
+    > view {
14
       padding: 0 30px;
14
       padding: 0 30px;
15
       position: relative;
15
       position: relative;
16
       overflow: hidden;
16
       overflow: hidden;
17
-      >view {
17
+      > view {
18
         position: relative;
18
         position: relative;
19
         overflow: hidden;
19
         overflow: hidden;
20
         min-height: 80px;
20
         min-height: 80px;
21
         background: #fff;
21
         background: #fff;
22
         border-radius: 24px;
22
         border-radius: 24px;
23
-        >.Status {
23
+        > .Status {
24
           text-align: center;
24
           text-align: center;
25
           margin-top: 40px;
25
           margin-top: 40px;
26
-          >text {
26
+          > text {
27
             font-size: 34px;
27
             font-size: 34px;
28
             font-weight: bold;
28
             font-weight: bold;
29
-            color: #193C83;
29
+            color: #193c83;
30
             display: block;
30
             display: block;
31
             text-align: center;
31
             text-align: center;
32
             line-height: 34px;
32
             line-height: 34px;
38
             }
38
             }
39
           }
39
           }
40
         }
40
         }
41
-        >.Tips {
41
+        > .Tips {
42
           position: relative;
42
           position: relative;
43
           overflow: hidden;
43
           overflow: hidden;
44
           margin-top: 30px;
44
           margin-top: 30px;
45
-          >text {
45
+          > text {
46
             display: block;
46
             display: block;
47
             text-align: center;
47
             text-align: center;
48
             font-size: 26px;
48
             font-size: 26px;
51
             white-space: nowrap;
51
             white-space: nowrap;
52
           }
52
           }
53
         }
53
         }
54
-        >.Btn {
54
+        > .Btn {
55
           padding: 0 80px;
55
           padding: 0 80px;
56
           position: relative;
56
           position: relative;
57
           overflow: hidden;
57
           overflow: hidden;
58
           margin-top: 40px;
58
           margin-top: 40px;
59
           align-items: center;
59
           align-items: center;
60
           margin-bottom: 60px;
60
           margin-bottom: 60px;
61
-          >text, button {
61
+          > text,
62
+          button {
62
             padding: 0;
63
             padding: 0;
63
             font-size: 30px;
64
             font-size: 30px;
64
             line-height: 78px;
65
             line-height: 78px;
65
             border-radius: 78px;
66
             border-radius: 78px;
66
             margin-left: 60px;
67
             margin-left: 60px;
67
             text-align: center;
68
             text-align: center;
68
-            border: 2px solid #193C83;
69
+            border: 2px solid #193c83;
69
             box-sizing: border-box;
70
             box-sizing: border-box;
70
-            color: #193C83;
71
+            color: #193c83;
71
             font-weight: bold;
72
             font-weight: bold;
72
             &:first-child {
73
             &:first-child {
73
               margin-left: 0;
74
               margin-left: 0;
74
             }
75
             }
75
             &.active {
76
             &.active {
76
-              background: #193C83;
77
+              background: #193c83;
77
               color: #fff;
78
               color: #fff;
78
             }
79
             }
79
           }
80
           }
80
         }
81
         }
81
-        >.Recommend {
82
+        > .Recommend {
82
           padding: 0 30px;
83
           padding: 0 30px;
83
           position: relative;
84
           position: relative;
84
           overflow: hidden;
85
           overflow: hidden;
85
-          >.Title {
86
+          > .Title {
86
             position: relative;
87
             position: relative;
87
             overflow: hidden;
88
             overflow: hidden;
88
             &::after {
89
             &::after {
89
-              content: '';
90
+              content: "";
90
               width: 100%;
91
               width: 100%;
91
               display: block;
92
               display: block;
92
               position: absolute;
93
               position: absolute;
96
               background: rgba(0, 0, 0, 0.12);
97
               background: rgba(0, 0, 0, 0.12);
97
               z-index: 1;
98
               z-index: 1;
98
             }
99
             }
99
-            >view {
100
+            > view {
100
               display: block;
101
               display: block;
101
               position: relative;
102
               position: relative;
102
               z-index: 2;
103
               z-index: 2;
106
               text-align: center;
107
               text-align: center;
107
               font-size: 0;
108
               font-size: 0;
108
               &::after {
109
               &::after {
109
-                content: '';
110
+                content: "";
110
                 width: 100%;
111
                 width: 100%;
111
                 display: block;
112
                 display: block;
112
                 position: absolute;
113
                 position: absolute;
116
                 z-index: 2;
117
                 z-index: 2;
117
                 border-bottom: 2px dashed #333;
118
                 border-bottom: 2px dashed #333;
118
               }
119
               }
119
-              >text {
120
+              > text {
120
                 display: inline-block;
121
                 display: inline-block;
121
                 position: relative;
122
                 position: relative;
122
                 z-index: 3;
123
                 z-index: 3;
129
               }
130
               }
130
             }
131
             }
131
           }
132
           }
132
-          >.PlanTitle {
133
-            font-size: 30px;
134
-            font-weight: bold;
135
-            white-space: nowrap;
136
-            position: relative;
137
-            overflow: hidden;
138
-            margin-top: 40px;
139
-            text-align: center;
140
-            >text {
141
-              color: #FC3838;
142
-            }
143
-          }
144
-          >.RecommendBuildingItem {
133
+          > .ScrollViewX {
134
+            width: 100%;
135
+            height: 400px;
145
             position: relative;
136
             position: relative;
146
             overflow: hidden;
137
             overflow: hidden;
147
-            padding: 0 60px;
148
             margin-top: 30px;
138
             margin-top: 30px;
149
             margin-bottom: 50px;
139
             margin-bottom: 50px;
150
-            >view {
151
-              position: relative;
152
-              overflow: hidden;
153
-              >.Img {
154
-                width: 100%;
155
-                padding-bottom: 60%;
156
-                position: relative;
157
-                overflow: hidden;
158
-                background: #eee;
159
-                >image {
160
-                  width: 100%;
161
-                  height: 100%;
162
-                }
163
-              }
164
-              >.Title {
165
-                align-items: flex-start;
166
-                margin-top: 24px;
167
-                >.flex-item {
168
-                  >text {
169
-                    display: block;
170
-                    font-size: 32px;
171
-                    font-weight: bold;
172
-                    color: #333;
173
-                    line-height: 40px;
174
-                    overflow: hidden;
175
-                    white-space: nowrap;
176
-                    text-overflow: ellipsis;
140
+            &.active {
141
+              height: 470px;
142
+            }
143
+            > scroll-view {
144
+              width: 100%;
145
+              height: 100%;
146
+              .ListContainer {
147
+                min-width: 100%;
148
+                white-space: nowrap;
149
+                font-size: 0;
150
+                > .RecommendBuildingItem {
151
+                  &:only-child {
152
+                    width: 100%;
153
+                    margin-right: 0;
177
                   }
154
                   }
178
-                }
179
-                >.Price {
180
-                  font-size: 22px;
181
-                  font-weight: bold;
182
-                  color: #333;
183
-                  margin-left: 10px;
184
-                  line-height: 40px;
185
-                  max-width: 50%;
155
+                  position: relative;
186
                   overflow: hidden;
156
                   overflow: hidden;
187
-                  white-space: nowrap;
188
-                  text-overflow: ellipsis;
189
-                  >text {
190
-                    color: #FC2C2C;
157
+                  display: inline-block;
158
+                  vertical-align: middle;
159
+                  width: 500px;
160
+                  margin-right: 30px;
161
+                  > view {
162
+                    position: relative;
163
+                    overflow: hidden;
164
+                    > .Img {
165
+                      width: 100%;
166
+                      padding-bottom: 60%;
167
+                      position: relative;
168
+                      overflow: hidden;
169
+                      background: #eee;
170
+                      > image {
171
+                        width: 100%;
172
+                        height: 100%;
173
+                      }
174
+                    }
175
+                    > .Title {
176
+                      align-items: flex-start;
177
+                      margin-top: 24px;
178
+                      > .flex-item {
179
+                        > text {
180
+                          display: block;
181
+                          font-size: 32px;
182
+                          font-weight: bold;
183
+                          color: #333;
184
+                          line-height: 40px;
185
+                          overflow: hidden;
186
+                          white-space: nowrap;
187
+                          text-overflow: ellipsis;
188
+                        }
189
+                      }
190
+                      > .Price {
191
+                        font-size: 22px;
192
+                        font-weight: bold;
193
+                        color: #333;
194
+                        margin-left: 10px;
195
+                        line-height: 40px;
196
+                        max-width: 50%;
197
+                        overflow: hidden;
198
+                        white-space: nowrap;
199
+                        text-overflow: ellipsis;
200
+                        > text {
201
+                          color: #fc2c2c;
202
+                        }
203
+                      }
204
+                    }
205
+                    > .Address {
206
+                      font-size: 22px;
207
+                      color: #666;
208
+                      line-height: 30px;
209
+                      margin-top: 20px;
210
+                    }
191
                   }
211
                   }
192
                 }
212
                 }
193
               }
213
               }
194
-              >.Address {
195
-                font-size: 22px;
196
-                color: #666;
197
-                line-height: 30px;
198
-                margin-top: 20px;
199
-              }
214
+            }
215
+          }
216
+          > .PlanTitle {
217
+            font-size: 30px;
218
+            font-weight: bold;
219
+            white-space: nowrap;
220
+            position: relative;
221
+            overflow: hidden;
222
+            margin-top: 40px;
223
+            text-align: center;
224
+            > text {
225
+              color: #fc3838;
200
             }
226
             }
201
           }
227
           }
202
         }
228
         }

+ 3
- 2
src/pages/index/newsList/index.jsx View File

8
 import './index.scss'
8
 import './index.scss'
9
 import NewsListItem from '../components/NewsListItem/index'
9
 import NewsListItem from '../components/NewsListItem/index'
10
 
10
 
11
-export default withLayout(() => {
11
+export default withLayout((props) => {
12
   
12
   
13
+  const { city } = props
13
   const user = useSelector(state => state.user)
14
   const user = useSelector(state => state.user)
14
   const [PageList, setPageList] = useState([])
15
   const [PageList, setPageList] = useState([])
15
   const [IsPull, setPull] = useState(false)
16
   const [IsPull, setPull] = useState(false)
35
 
36
 
36
   const GetPageList = () => {
37
   const GetPageList = () => {
37
     setHasNextPage(false)
38
     setHasNextPage(false)
38
-    fetch({ url: API_NEWS_LIST, method: 'get', payload: { pageNumber, pageSize: 10 } }).then((res) => {
39
+    fetch({ url: API_NEWS_LIST, method: 'get', payload: { pageNumber, pageSize: 10, cityId: city.id } }).then((res) => {
39
       setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
40
       setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
40
       setHasNextPage(res.current < res.pages)
41
       setHasNextPage(res.current < res.pages)
41
       setPull(false)
42
       setPull(false)

+ 2
- 1
src/subpackages/pages/consultant/myHomepage/index.config.js View File

1
 export default {
1
 export default {
2
-  navigationBarTitleText: '个人主页'
2
+  navigationBarTitleText: '个人主页',
3
+  enableShareAppMessage: true
3
 }
4
 }

+ 2
- 2
src/subpackages/pages/consultant/myHomepage/index.jsx View File

1
 import { useState, useEffect } from 'react'
1
 import { useState, useEffect } from 'react'
2
 import Taro from '@tarojs/taro'
2
 import Taro from '@tarojs/taro'
3
 import withLayout from '@/layout'
3
 import withLayout from '@/layout'
4
-import { ScrollView, Image } from '@tarojs/components'
4
+import { ScrollView, Image, Button } from '@tarojs/components'
5
 import ProjectListItem from '@/components/ProjectListItem/index'
5
 import ProjectListItem from '@/components/ProjectListItem/index'
6
 import { useSelector } from 'react-redux'
6
 import { useSelector } from 'react-redux'
7
 import { fetch } from '@/utils/request'
7
 import { fetch } from '@/utils/request'
162
               </view>
162
               </view>
163
             </view>
163
             </view>
164
             <view className='Btn'>
164
             <view className='Btn'>
165
-              <text>分享主页</text>
165
+              <Button className='Share' open-type='share'>分享主页</Button>
166
             </view>
166
             </view>
167
           </view>
167
           </view>
168
 
168
 

+ 6
- 1
src/subpackages/pages/consultant/myHomepage/index.scss View File

209
           }
209
           }
210
           > .Btn {
210
           > .Btn {
211
             margin-top: 40px;
211
             margin-top: 40px;
212
-            > text {
212
+            > button {
213
               display: block;
213
               display: block;
214
               text-align: center;
214
               text-align: center;
215
               font-size: 32px;
215
               font-size: 32px;
218
               color: #333;
218
               color: #333;
219
               font-weight: bold;
219
               font-weight: bold;
220
               background: #f2f2f2;
220
               background: #f2f2f2;
221
+              border: none;
222
+              &::after {
223
+                border: none;
224
+              }
221
             }
225
             }
222
           }
226
           }
223
         }
227
         }
349
             line-height: 92px;
353
             line-height: 92px;
350
             background: #193c83;
354
             background: #193c83;
351
             border-radius: 92px;
355
             border-radius: 92px;
356
+            border: none;
352
           }
357
           }
353
         }
358
         }
354
       }
359
       }