Selaa lähdekoodia

开发活动与作品页去掉banner

bayi 1 vuosi sitten
vanhempi
commit
24fb6b06d4
5 muutettua tiedostoa jossa 52 lisäystä ja 50 poistoa
  1. 1 1
      pages/activity/index.wxml
  2. 2 2
      pages/works/index.js
  3. 34 33
      pages/works/index.less
  4. 14 14
      pages/works/index.wxml
  5. 1 0
      pages/works/index.wxss

+ 1 - 1
pages/activity/index.wxml

@@ -1,5 +1,5 @@
 <navigationBar bind:reload='resetData'></navigationBar>
 <view class="activityBox">
-  <banner bannerList="{{bannerList}}" />
+  <!-- <banner bannerList="{{bannerList}}" /> -->
   <activityList id="activityList" class="activityList" wx:if="{{activityList}}" />
 </view>

+ 2 - 2
pages/works/index.js

@@ -78,11 +78,11 @@ Page({
    * 监听页面滚动事件
    */
   onPageScroll(e) {
-    if (e.scrollTop >= 110 && !this.data.isFixed) {
+    if (e.scrollTop >= 6 && !this.data.isFixed) {
       this.setData({
         isFixed: true
       })
-    } else if (e.scrollTop < 20 && this.data.isFixed) {
+    } else if (e.scrollTop < 6 && this.data.isFixed) {
       this.setData({
         isFixed: false
       })

+ 34 - 33
pages/works/index.less

@@ -1,40 +1,41 @@
 .worksBox {
-  .selectType {
-    padding: 30rpx 15rpx 30rpx 26rpx;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    z-index: 20;
+    .selectType {
+        padding: 30rpx 15rpx 30rpx 26rpx;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        z-index: 20;
+        background-color: #F2F6FC;
 
-    .type {
-      padding: 14rpx 0rpx;
-      width: 200rpx;
-      box-sizing: border-box;
-      text-align: center;
-      border: 1rpx solid #9f9f9fa4;
-      border-radius: 50rpx;
-      color: #1A1A1A;
-      font-size: 28rpx;
-    }
+        .type {
+            padding: 14rpx 0rpx;
+            width: 200rpx;
+            box-sizing: border-box;
+            text-align: center;
+            border: 1rpx solid #9f9f9fa4;
+            border-radius: 50rpx;
+            color: #1A1A1A;
+            font-size: 28rpx;
+        }
 
-    .currentType {
-      box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
-      color: white;
-      border-color: #00C657;
-      background-color: #00C657;
-      font-weight: bold;
-    }
+        .currentType {
+            box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
+            color: white;
+            border-color: #00C657;
+            background-color: #00C657;
+            font-weight: bold;
+        }
 
-    .search {
-      padding: 8rpx 20rpx;
-      text-align: center;
-      border: 1rpx solid #9f9f9fa4;
-      border-radius: 50rpx;
+        .search {
+            padding: 8rpx 20rpx;
+            text-align: center;
+            border: 1rpx solid #9f9f9fa4;
+            border-radius: 50rpx;
 
-      .searchImg {
-        width: 26rpx;
-        height: 26rpx;
-      }
+            .searchImg {
+                width: 26rpx;
+                height: 26rpx;
+            }
+        }
     }
-  }
 }

+ 14 - 14
pages/works/index.wxml

@@ -1,18 +1,18 @@
 <navigationBar bind:reload='requestAgain'></navigationBar>
 <view class="worksBox">
-  <!-- 轮播图 -->
-  <banner bannerList="{{bannerList}}" />
-  <!-- 切换类型 -->
-  <view class="selectType {{isFixed?'isFixed isFixed2':''}}" style="top:{{navBarHeight}}px;" bindtap="changeType">
-    <view class="type {{currentType=='4'?'currentType':''}}" data-type='4'>关注作品</view>
-    <view class="type {{currentType=='5'?'currentType':''}}" data-type='5'>我的作品</view>
-    <view class="type {{currentType=='6'?'currentType':''}}" data-type='6'>收藏作品</view>
-  </view>
-  <!-- 优秀作品展播及官方推荐列表组件 -->
-  <worksList wx:if="{{currentType!='7'}}" id="worksList"
-    videoType="{{currentType=='4'||currentType=='6'?'follow':'my'}}" worksList="{{list}}" tabBarPadding='true'
-    autoPlay='{{false}}' />
-  <emptyBg wx:if="{{nullList}}"
-    message="{{currentType=='4'?'您还没有关注的用户哦':currentType=='5'?'您还没有作品哦,赶快去发表吧':'您还没有收藏作品哦'}}"></emptyBg>
+    <!-- 轮播图 -->
+    <!-- <banner bannerList="{{bannerList}}" /> -->
+    <!-- 切换类型 -->
+    <view class="selectType {{isFixed?'isFixed isFixed2':''}}" style="top:{{navBarHeight}}px;" bindtap="changeType">
+        <view class="type {{currentType=='4'?'currentType':''}}" data-type='4'>关注作品</view>
+        <view class="type {{currentType=='5'?'currentType':''}}" data-type='5'>我的作品</view>
+        <view class="type {{currentType=='6'?'currentType':''}}" data-type='6'>收藏作品</view>
+    </view>
+    <!-- 优秀作品展播及官方推荐列表组件 -->
+    <worksList wx:if="{{currentType!='7'}}" id="worksList"
+        videoType="{{currentType=='4'||currentType=='6'?'follow':'my'}}" worksList="{{list}}" tabBarPadding='true'
+        autoPlay='{{false}}' />
+    <emptyBg wx:if="{{nullList}}"
+        message="{{currentType=='4'?'您还没有关注的用户哦':currentType=='5'?'您还没有作品哦,赶快去发表吧':'您还没有收藏作品哦'}}"></emptyBg>
 </view>
 <canvas id='share' type="2d"> </canvas>

+ 1 - 0
pages/works/index.wxss

@@ -4,6 +4,7 @@
   align-items: center;
   justify-content: space-between;
   z-index: 20;
+  background-color: #F2F6FC;
 }
 .worksBox .selectType .type {
   padding: 14rpx 0rpx;