浏览代码

静态页面

xcx 4 年前
父节点
当前提交
beec9e6753
共有 3 个文件被更改,包括 58 次插入52 次删除
  1. 12
    10
      src/pages/ShouYe/index.css
  2. 14
    12
      src/pages/ShouYe/index.jsx
  3. 32
    30
      src/pages/ShouYe/index.less

+ 12
- 10
src/pages/ShouYe/index.css 查看文件

39
 }
39
 }
40
 .ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent {
40
 .ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent {
41
   padding: 0 30px;
41
   padding: 0 30px;
42
+  position: relative;
43
+  overflow: hidden;
44
+  margin-bottom: 10px;
45
+  margin-top: 10px;
46
+}
47
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > view {
42
   height: 60px;
48
   height: 60px;
43
-  background: #FFC412;
49
+  background: rgba(243, 91, 71, 0.12);
44
   position: relative;
50
   position: relative;
45
   overflow: hidden;
51
   overflow: hidden;
46
-  margin-bottom: 20px;
47
   align-items: center;
52
   align-items: center;
48
-  display: none;
49
-}
50
-.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent.active {
51
-  display: flex;
53
+  border-radius: 24px;
52
 }
54
 }
53
-.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > text {
55
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > view > text {
54
   color: #fff;
56
   color: #fff;
55
   font-size: 32px;
57
   font-size: 32px;
56
   line-height: 60px;
58
   line-height: 60px;
57
 }
59
 }
58
-.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > .flex-item {
60
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > view > .flex-item {
59
   margin: 0 10px;
61
   margin: 0 10px;
60
   position: relative;
62
   position: relative;
61
   overflow: hidden;
63
   overflow: hidden;
62
   height: 60px;
64
   height: 60px;
63
 }
65
 }
64
-.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > .flex-item > view {
66
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > view > .flex-item > view {
65
   display: block;
67
   display: block;
66
   position: relative;
68
   position: relative;
67
   overflow: hidden;
69
   overflow: hidden;
68
   height: 60px;
70
   height: 60px;
69
 }
71
 }
70
-.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > .flex-item > view > text {
72
+.ShouYe > view.flex-item > .PageContainer .Content > view > .NoticeContent > view > .flex-item > view > text {
71
   display: inline-block;
73
   display: inline-block;
72
   font-size: 28px;
74
   font-size: 28px;
73
   color: #fff;
75
   color: #fff;

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

202
 
202
 
203
                 <view>
203
                 <view>
204
 
204
 
205
-                  {/* 通知栏 */}
206
-                  <view className={ShowNotice ? 'NoticeContent flex-h active' : 'NoticeContent flex-h'}>
207
-                    <text className='iconfont icontongzhi1'></text>
208
-                    <view id='NoticeParent' className='flex-item' onClick={() => { Taro.navigateTo({ url: `/pages/WuYe/GongGaoDetail/index?id=${NoticeInfo.id}` }) }}>
209
-                      <view style={{ width: `${NoticeWidth > NoticeParentWidth ? NoticeWidth : NoticeParentWidth}px` }}>
210
-                        <text id='NoticeText'>{NoticeInfo === null ? '' : NoticeInfo.announcementTitle}</text>
211
-                      </view>
212
-                    </view>
213
-                    <text className='iconfont iconguanbi' onClick={() => { setShowNotice(false) }}></text>
214
-                  </view>
215
-
216
                   {/* 欢迎词 */}
205
                   {/* 欢迎词 */}
217
                   <Text className='Welcome'>欢迎来到远道智慧社区!</Text>
206
                   <Text className='Welcome'>欢迎来到远道智慧社区!</Text>
218
 
207
 
235
                     </view>
224
                     </view>
236
                   </view>
225
                   </view>
237
 
226
 
227
+                  {/* 通知栏 */}
228
+                  <view className='NoticeContent'>
229
+                    <view className='flex-h'>
230
+                      <text className='iconfont icontongzhi1'></text>
231
+                      <view id='NoticeParent' className='flex-item' onClick={() => { Taro.navigateTo({ url: `/pages/WuYe/GongGaoDetail/index?id=${NoticeInfo.id}` }) }}>
232
+                        <view style={{ width: `${NoticeWidth > NoticeParentWidth ? NoticeWidth : NoticeParentWidth}px` }}>
233
+                          <text id='NoticeText'>{NoticeInfo === null ? '' : NoticeInfo.announcementTitle}</text>
234
+                        </view>
235
+                      </view>
236
+                      {/* <text className='iconfont iconguanbi' onClick={() => { setShowNotice(false) }}></text> */}
237
+                    </view>
238
+                  </view>
239
+
238
                   {/* 导航 */}
240
                   {/* 导航 */}
239
                   <view className='NavContainer flex-h'>
241
                   <view className='NavContainer flex-h'>
240
                     {
242
                     {
261
                         {
263
                         {
262
                           OwnerList.map((item, index) => (
264
                           OwnerList.map((item, index) => (
263
                             <view className='flex-item' key={`Owners-${index}`} onClick={OwnerClick(item)}>
265
                             <view className='flex-item' key={`Owners-${index}`} onClick={OwnerClick(item)}>
264
-                              <Text className={`iconfont ${item.icon}`} style={{fontWeight: item.bold !== undefined && item.bold === true ? 'bold' : 'normal'}}></Text>
266
+                              <Text className={`iconfont ${item.icon}`} style={{ fontWeight: item.bold !== undefined && item.bold === true ? 'bold' : 'normal' }}></Text>
265
                               <view>
267
                               <view>
266
                                 <view><Text>{item.name}</Text></view>
268
                                 <view><Text>{item.name}</Text></view>
267
                               </view>
269
                               </view>

+ 32
- 30
src/pages/ShouYe/index.less 查看文件

44
 
44
 
45
             >.NoticeContent {
45
             >.NoticeContent {
46
               padding: 0 30px;
46
               padding: 0 30px;
47
-              height: 60px;
48
-              background: #FFC412;
49
               position: relative;
47
               position: relative;
50
               overflow: hidden;
48
               overflow: hidden;
51
-              margin-bottom: 20px;
52
-              align-items: center;
53
-              display: none;
54
-
55
-              &.active {
56
-                display: flex;
57
-              }
58
-
59
-              >text {
60
-                color: #fff;
61
-                font-size: 32px;
62
-                line-height: 60px;
63
-              }
49
+              margin-bottom: 10px;
50
+              margin-top: 10px;
64
 
51
 
65
-              >.flex-item {
66
-                margin: 0 10px;
52
+              >view {
53
+                height: 60px;
54
+                background: rgba(243, 91, 71, 0.12);
67
                 position: relative;
55
                 position: relative;
68
                 overflow: hidden;
56
                 overflow: hidden;
69
-                height: 60px;
57
+                align-items: center;
58
+                border-radius: 24px;
70
 
59
 
71
-                >view {
72
-                  display: block;
60
+                >text {
61
+                  color: #fff;
62
+                  font-size: 32px;
63
+                  line-height: 60px;
64
+                }
65
+
66
+                >.flex-item {
67
+                  margin: 0 10px;
73
                   position: relative;
68
                   position: relative;
74
                   overflow: hidden;
69
                   overflow: hidden;
75
                   height: 60px;
70
                   height: 60px;
76
 
71
 
77
-                  >text {
78
-                    display: inline-block;
79
-                    font-size: 28px;
80
-                    color: #fff;
81
-                    white-space: nowrap;
82
-                    line-height: 60px;
83
-                    position: absolute;
84
-                    top: 0;
85
-                    animation: 5s move infinite linear;
86
-                    -webkit-animation: 5s move infinite linear;
72
+                  >view {
73
+                    display: block;
74
+                    position: relative;
75
+                    overflow: hidden;
76
+                    height: 60px;
77
+
78
+                    >text {
79
+                      display: inline-block;
80
+                      font-size: 28px;
81
+                      color: #fff;
82
+                      white-space: nowrap;
83
+                      line-height: 60px;
84
+                      position: absolute;
85
+                      top: 0;
86
+                      animation: 5s move infinite linear;
87
+                      -webkit-animation: 5s move infinite linear;
88
+                    }
87
                   }
89
                   }
88
                 }
90
                 }
89
               }
91
               }