浏览代码

静态页面

1002884655 3 年前
父节点
当前提交
babcb43aab

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

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 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 8
     // HOST: '"http://127.0.0.1:8567"',
9 9
     WSS_HOST: '"wss://xlk.njyz.tech"',
10 10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',

+ 24
- 13
src/pages/index/helpToFindHouse/components/SubmitBuyHouseResult/index.jsx 查看文件

@@ -1,8 +1,9 @@
1 1
 
2 2
 import { useState } from 'react'
3 3
 import Taro from '@tarojs/taro'
4
-import { Image, Block } from '@tarojs/components'
4
+import { Image, Block, ScrollView } from '@tarojs/components'
5 5
 import { getImgURL } from '@/utils/image'
6
+import ProjectItemCard from '@/components/ProjectItemCard/index'
6 7
 import '@/assets/css/iconfont.css'
7 8
 import './index.scss'
8 9
 
@@ -53,19 +54,29 @@ export default function SubmitBuyHouseResult (props) {
53 54
                     <text>匹配楼盘</text>
54 55
                   </view>
55 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 78
                     </view>
67
-                    <text className='Address'>{List[0].address}</text>
68
-                  </view>
79
+                  </ScrollView>
69 80
                 </view>
70 81
               </view>
71 82
             }

+ 104
- 78
src/pages/index/helpToFindHouse/components/SubmitBuyHouseResult/index.scss 查看文件

@@ -8,25 +8,25 @@
8 8
   margin: 0 !important;
9 9
   padding: 0 !important;
10 10
   z-index: 100 !important;
11
-  >view {
11
+  > view {
12 12
     width: 100%;
13
-    >view {
13
+    > view {
14 14
       padding: 0 30px;
15 15
       position: relative;
16 16
       overflow: hidden;
17
-      >view {
17
+      > view {
18 18
         position: relative;
19 19
         overflow: hidden;
20 20
         min-height: 80px;
21 21
         background: #fff;
22 22
         border-radius: 24px;
23
-        >.Status {
23
+        > .Status {
24 24
           text-align: center;
25 25
           margin-top: 40px;
26
-          >text {
26
+          > text {
27 27
             font-size: 34px;
28 28
             font-weight: bold;
29
-            color: #193C83;
29
+            color: #193c83;
30 30
             display: block;
31 31
             text-align: center;
32 32
             line-height: 34px;
@@ -38,11 +38,11 @@
38 38
             }
39 39
           }
40 40
         }
41
-        >.Tips {
41
+        > .Tips {
42 42
           position: relative;
43 43
           overflow: hidden;
44 44
           margin-top: 30px;
45
-          >text {
45
+          > text {
46 46
             display: block;
47 47
             text-align: center;
48 48
             font-size: 26px;
@@ -51,42 +51,43 @@
51 51
             white-space: nowrap;
52 52
           }
53 53
         }
54
-        >.Btn {
54
+        > .Btn {
55 55
           padding: 0 80px;
56 56
           position: relative;
57 57
           overflow: hidden;
58 58
           margin-top: 40px;
59 59
           align-items: center;
60 60
           margin-bottom: 60px;
61
-          >text, button {
61
+          > text,
62
+          button {
62 63
             padding: 0;
63 64
             font-size: 30px;
64 65
             line-height: 78px;
65 66
             border-radius: 78px;
66 67
             margin-left: 60px;
67 68
             text-align: center;
68
-            border: 2px solid #193C83;
69
+            border: 2px solid #193c83;
69 70
             box-sizing: border-box;
70
-            color: #193C83;
71
+            color: #193c83;
71 72
             font-weight: bold;
72 73
             &:first-child {
73 74
               margin-left: 0;
74 75
             }
75 76
             &.active {
76
-              background: #193C83;
77
+              background: #193c83;
77 78
               color: #fff;
78 79
             }
79 80
           }
80 81
         }
81
-        >.Recommend {
82
+        > .Recommend {
82 83
           padding: 0 30px;
83 84
           position: relative;
84 85
           overflow: hidden;
85
-          >.Title {
86
+          > .Title {
86 87
             position: relative;
87 88
             overflow: hidden;
88 89
             &::after {
89
-              content: '';
90
+              content: "";
90 91
               width: 100%;
91 92
               display: block;
92 93
               position: absolute;
@@ -96,7 +97,7 @@
96 97
               background: rgba(0, 0, 0, 0.12);
97 98
               z-index: 1;
98 99
             }
99
-            >view {
100
+            > view {
100 101
               display: block;
101 102
               position: relative;
102 103
               z-index: 2;
@@ -106,7 +107,7 @@
106 107
               text-align: center;
107 108
               font-size: 0;
108 109
               &::after {
109
-                content: '';
110
+                content: "";
110 111
                 width: 100%;
111 112
                 display: block;
112 113
                 position: absolute;
@@ -116,7 +117,7 @@
116 117
                 z-index: 2;
117 118
                 border-bottom: 2px dashed #333;
118 119
               }
119
-              >text {
120
+              > text {
120 121
                 display: inline-block;
121 122
                 position: relative;
122 123
                 z-index: 3;
@@ -129,74 +130,99 @@
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 136
             position: relative;
146 137
             overflow: hidden;
147
-            padding: 0 60px;
148 138
             margin-top: 30px;
149 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 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 查看文件

@@ -8,8 +8,9 @@ import { API_NEWS_LIST } from '@/constants/api'
8 8
 import './index.scss'
9 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 14
   const user = useSelector(state => state.user)
14 15
   const [PageList, setPageList] = useState([])
15 16
   const [IsPull, setPull] = useState(false)
@@ -35,7 +36,7 @@ export default withLayout(() => {
35 36
 
36 37
   const GetPageList = () => {
37 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 40
       setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
40 41
       setHasNextPage(res.current < res.pages)
41 42
       setPull(false)

+ 2
- 1
src/subpackages/pages/consultant/myHomepage/index.config.js 查看文件

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

+ 2
- 2
src/subpackages/pages/consultant/myHomepage/index.jsx 查看文件

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

+ 6
- 1
src/subpackages/pages/consultant/myHomepage/index.scss 查看文件

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