张延森 4 jaren geleden
bovenliggende
commit
49567476bd
5 gewijzigde bestanden met toevoegingen van 40 en 34 verwijderingen
  1. 1
    1
      src/app.js
  2. 3
    2
      src/components/Spin/index.jsx
  3. 2
    1
      src/pages/ShouYe/index.config.js
  4. 17
    17
      src/pages/ShouYe/index.jsx
  5. 17
    13
      src/pages/ShouYe/index.less

+ 1
- 1
src/app.js Bestand weergeven

@@ -48,7 +48,7 @@ class App extends Component {
48 48
             Taro.setStorage({ key: 'sessionKey', data: x.sessionKey })
49 49
 
50 50
             // 埋点
51
-            this.updateTracing = trackUserSource(router, x.scene)
51
+            trackUserSource(router, x.scene).then(res => this.updateTracing = res)
52 52
           })
53 53
         }
54 54
       }

+ 3
- 2
src/components/Spin/index.jsx Bestand weergeven

@@ -8,7 +8,8 @@ const inCenter = {
8 8
   display: 'block',
9 9
   width: '40vw',
10 10
   height: '40vw',
11
-  margin: '15vh auto'
11
+  margin: '15vh auto',
12
+  position: 'relative'
12 13
 }
13 14
 
14 15
 export default props => {
@@ -16,7 +17,7 @@ export default props => {
16 17
   const color = props.color || '#9e1068'
17 18
   const tipText = props.tips || 'LOADING'
18 19
   const cubeStyle = { backgroundColor: color }
19
-  const tipStyle = { color, textAlign: 'center', marginTop: '-18vh' }
20
+  const tipStyle = { color, textAlign: 'center', position: 'absolute', top: '45vw', left: 0, width: '100%' }
20 21
 
21 22
   return (
22 23
     <>

+ 2
- 1
src/pages/ShouYe/index.config.js Bestand weergeven

@@ -1,4 +1,5 @@
1 1
 export default {
2 2
   navigationStyle: 'custom',
3
-  navigationBarTextStyle: 'white'
3
+  navigationBarTextStyle: 'white',
4
+  enableShareAppMessage: true
4 5
 }

+ 17
- 17
src/pages/ShouYe/index.jsx Bestand weergeven

@@ -147,7 +147,8 @@ export default function Index (props) {
147 147
 
148 148
   // 分享转发
149 149
   Taro.useShareAppMessage(() => {
150
-    return getShareObject({ title: '远道智慧社区' }, user)
150
+    const shareObj = getShareObject({ title: '远道智慧社区' }, user)
151
+    return shareObj
151 152
   })
152 153
 
153 154
   return (
@@ -205,22 +206,6 @@ export default function Index (props) {
205 206
                     }
206 207
                   </view>
207 208
 
208
-                  {/* 热门活动 */}
209
-                  {
210
-                    propagandaList.length > 0 &&
211
-                    <view className='HotActivityContainer'>
212
-                      <view>
213
-                        <view className='Title'>
214
-                          <Text>热门活动</Text>
215
-                          <Text className='iconfont icongengduo'></Text>
216
-                        </view>
217
-                        <view className='Activity' onClick={() => nav2detail({type: propagandaList[0].contentType, id: propagandaList[0].targetId})}>
218
-                          <image className='centerLabel' mode='aspectFill' src={propagandaList[0].image}></image>
219
-                        </view>
220
-                      </view>
221
-                    </view>
222
-                  }
223
-
224 209
                   {/* 业主专区 */}
225 210
                   <view className='OwnerContainer'>
226 211
                     <view>
@@ -240,6 +225,21 @@ export default function Index (props) {
240 225
                     </view>
241 226
                   </view>
242 227
 
228
+                  {/* 热门活动 */}
229
+                  {
230
+                    propagandaList.length > 0 &&
231
+                    <view className='HotActivityContainer'>
232
+                      <view>
233
+                        {/* <view className='Title'>
234
+                          <Text>热门推荐</Text>
235
+                        </view> */}
236
+                        <view className='Activity' onClick={() => nav2detail({type: propagandaList[0].contentType, id: propagandaList[0].targetId})}>
237
+                          <image className='centerLabel' mode='aspectFill' src={propagandaList[0].image}></image>
238
+                        </view>
239
+                      </view>
240
+                    </view>
241
+                  }
242
+
243 243
                   {/* 热门资讯 */}
244 244
                   <view className='NewsContainer'>
245 245
                     <view>

+ 17
- 13
src/pages/ShouYe/index.less Bestand weergeven

@@ -1,8 +1,12 @@
1
+
2
+@radius-large: 24rpx;
3
+@radius-middle: 16rpx;
4
+
1 5
 .ShouYe {
2 6
   width: 100%;
3 7
   height: 100%;
4 8
   overflow: hidden;
5
-  background: #f8f8f8;
9
+  background: #f0f0f0;
6 10
 
7 11
   >view {
8 12
     position: relative;
@@ -43,15 +47,15 @@
43 47
               display: block;
44 48
               font-size: 30px;
45 49
               color: #fff;
46
-              margin-top: 20px;
47 50
               text-indent: 30px;
51
+              margin-bottom: 20px;
48 52
             }
49 53
 
50 54
             >.BannerContainer {
51 55
               padding: 0 30px;
52 56
               position: relative;
53 57
               overflow: hidden;
54
-              margin-top: 50px;
58
+              // margin-top: 50px;
55 59
 
56 60
               >view {
57 61
                 width: 100%;
@@ -59,7 +63,7 @@
59 63
                 overflow: hidden;
60 64
                 padding-bottom: 50%;
61 65
                 background: #f8f8f8;
62
-                border-radius: 24px;
66
+                border-radius: @radius-middle;
63 67
                 height: 0;
64 68
 
65 69
                 >view {
@@ -75,14 +79,14 @@
75 79
                     height: 100%;
76 80
                     position: relative;
77 81
                     overflow: hidden;
78
-                    border-radius: 24px;
82
+                    border-radius: @radius-middle;
79 83
 
80 84
                     .BannerItem {
81 85
                       width: 100%;
82 86
                       height: 100%;
83 87
                       position: relative;
84 88
                       overflow: hidden;
85
-                      border-radius: 24px;
89
+                      border-radius: @radius-middle;
86 90
 
87 91
                       image {
88 92
                         width: 100%;
@@ -99,7 +103,7 @@
99 103
               overflow: hidden;
100 104
               align-items: center;
101 105
               padding: 0 30px;
102
-              margin-top: 40px;
106
+              margin-top: 30px;
103 107
 
104 108
               >view {
105 109
                 margin-left: 30px;
@@ -177,7 +181,7 @@
177 181
                       font-size: 26px;
178 182
 
179 183
                       &:first-child {
180
-                        font-size: 50px;
184
+                        font-size: 64px;
181 185
                         line-height: 60px;
182 186
                         margin-bottom: 10px;
183 187
                       }
@@ -197,7 +201,7 @@
197 201
                 width: 100%;
198 202
                 position: relative;
199 203
                 overflow: hidden;
200
-                border-radius: 40px;
204
+                border-radius: @radius-large;
201 205
                 background: #fff;
202 206
 
203 207
                 >.Title {
@@ -216,7 +220,7 @@
216 220
                       font-size: 34px;
217 221
                       color: #333;
218 222
                       line-height: 40px;
219
-                      font-weight: bold;
223
+                      // font-weight: bold;
220 224
                       margin-right: 20px;
221 225
                     }
222 226
                   }
@@ -246,7 +250,7 @@
246 250
                 width: 100%;
247 251
                 position: relative;
248 252
                 overflow: hidden;
249
-                border-radius: 40px;
253
+                border-radius: @radius-large;
250 254
                 background: #fff;
251 255
 
252 256
                 >.Title {
@@ -265,7 +269,7 @@
265 269
                       font-size: 34px;
266 270
                       color: #333;
267 271
                       line-height: 40px;
268
-                      font-weight: bold;
272
+                      // font-weight: bold;
269 273
                       margin-right: 20px;
270 274
                     }
271 275
                   }
@@ -307,7 +311,7 @@
307 311
                 position: relative;
308 312
                 overflow: hidden;
309 313
                 background: #fff;
310
-                border-radius: 40px;
314
+                border-radius: @radius-large;
311 315
 
312 316
                 >.Title {
313 317
                   align-items: center;