瀏覽代碼

Merge branch 'master' of http://git.ycjcjy.com/xiangsong/miniapp

张延森 4 年之前
父節點
當前提交
f3eb4aa831
共有 3 個檔案被更改,包括 51 行新增47 行删除
  1. 11
    10
      src/pages/ShouYe/index.css
  2. 9
    7
      src/pages/ShouYe/index.jsx
  3. 31
    30
      src/pages/ShouYe/index.less

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

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

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

@@ -203,14 +203,16 @@ export default function Index (props) {
203 203
                 <view>
204 204
 
205 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>
206
+                  <view className='NoticeContent'>
207
+                    <view className='flex-h'>
208
+                      <text className='iconfont icontongzhi1'></text>
209
+                      <view id='NoticeParent' className='flex-item' onClick={() => { Taro.navigateTo({ url: `/pages/WuYe/GongGaoDetail/index?id=${NoticeInfo.id}` }) }}>
210
+                        <view style={{ width: `${NoticeWidth > NoticeParentWidth ? NoticeWidth : NoticeParentWidth}px` }}>
211
+                          <text id='NoticeText'>{NoticeInfo === null ? '' : NoticeInfo.announcementTitle}</text>
212
+                        </view>
211 213
                       </view>
214
+                      <text className='iconfont iconguanbi' onClick={() => { setShowNotice(false) }}></text>
212 215
                     </view>
213
-                    <text className='iconfont iconguanbi' onClick={() => { setShowNotice(false) }}></text>
214 216
                   </view>
215 217
 
216 218
                   {/* 欢迎词 */}
@@ -261,7 +263,7 @@ export default function Index (props) {
261 263
                         {
262 264
                           OwnerList.map((item, index) => (
263 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 267
                               <view>
266 268
                                 <view><Text>{item.name}</Text></view>
267 269
                               </view>

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

@@ -44,46 +44,47 @@
44 44
 
45 45
             >.NoticeContent {
46 46
               padding: 0 30px;
47
-              height: 60px;
48
-              background: #FFC412;
49 47
               position: relative;
50 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
+              background: #ff8d61;
64 51
 
65
-              >.flex-item {
66
-                margin: 0 10px;
52
+              >view {
53
+                height: 60px;
67 54
                 position: relative;
68 55
                 overflow: hidden;
69
-                height: 60px;
56
+                align-items: center;
57
+                border-radius: 24px;
70 58
 
71
-                >view {
72
-                  display: block;
59
+                >text {
60
+                  color: #fff;
61
+                  font-size: 32px;
62
+                  line-height: 60px;
63
+                }
64
+
65
+                >.flex-item {
66
+                  margin: 0 10px;
73 67
                   position: relative;
74 68
                   overflow: hidden;
75 69
                   height: 60px;
76 70
 
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;
71
+                  >view {
72
+                    display: block;
73
+                    position: relative;
74
+                    overflow: hidden;
75
+                    height: 60px;
76
+
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;
87
+                    }
87 88
                   }
88 89
                 }
89 90
               }