张延森 4 年前
父节点
当前提交
49567476bd
共有 5 个文件被更改,包括 40 次插入34 次删除
  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 查看文件

48
             Taro.setStorage({ key: 'sessionKey', data: x.sessionKey })
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 查看文件

8
   display: 'block',
8
   display: 'block',
9
   width: '40vw',
9
   width: '40vw',
10
   height: '40vw',
10
   height: '40vw',
11
-  margin: '15vh auto'
11
+  margin: '15vh auto',
12
+  position: 'relative'
12
 }
13
 }
13
 
14
 
14
 export default props => {
15
 export default props => {
16
   const color = props.color || '#9e1068'
17
   const color = props.color || '#9e1068'
17
   const tipText = props.tips || 'LOADING'
18
   const tipText = props.tips || 'LOADING'
18
   const cubeStyle = { backgroundColor: color }
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
   return (
22
   return (
22
     <>
23
     <>

+ 2
- 1
src/pages/ShouYe/index.config.js 查看文件

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

+ 17
- 17
src/pages/ShouYe/index.jsx 查看文件

147
 
147
 
148
   // 分享转发
148
   // 分享转发
149
   Taro.useShareAppMessage(() => {
149
   Taro.useShareAppMessage(() => {
150
-    return getShareObject({ title: '远道智慧社区' }, user)
150
+    const shareObj = getShareObject({ title: '远道智慧社区' }, user)
151
+    return shareObj
151
   })
152
   })
152
 
153
 
153
   return (
154
   return (
205
                     }
206
                     }
206
                   </view>
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
                   <view className='OwnerContainer'>
210
                   <view className='OwnerContainer'>
226
                     <view>
211
                     <view>
240
                     </view>
225
                     </view>
241
                   </view>
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
                   <view className='NewsContainer'>
244
                   <view className='NewsContainer'>
245
                     <view>
245
                     <view>

+ 17
- 13
src/pages/ShouYe/index.less 查看文件

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