Browse Source

1.作品页面增加标签排行榜2.优化ui

bayi 2 years atrás
parent
commit
c23d3985bf

+ 3 - 2
pages/childClassify/index.less

@@ -15,8 +15,8 @@
     .name {
       text-align: center;
       display: inline-block;
-      padding: 0rpx 20rpx;
-      margin-right: 40rpx;
+      margin: 0rpx 40rpx;
+      padding-bottom: 4rpx;
       color: #777;
       font-weight: bold;
       font-size: 28rpx;
@@ -25,6 +25,7 @@
     .currentClass {
       font-size: 34rpx;
       color: #333;
+      border-bottom: 6rpx solid #00C657;
     }
   }
 

+ 3 - 2
pages/childClassify/index.wxss

@@ -15,8 +15,8 @@
 .classBox .classify .name {
   text-align: center;
   display: inline-block;
-  padding: 0rpx 20rpx;
-  margin-right: 40rpx;
+  margin: 0rpx 40rpx;
+  padding-bottom: 4rpx;
   color: #777;
   font-weight: bold;
   font-size: 28rpx;
@@ -24,6 +24,7 @@
 .classBox .classify .currentClass {
   font-size: 34rpx;
   color: #333;
+  border-bottom: 6rpx solid #00C657;
 }
 .classBox .searchBox {
   position: fixed;

+ 2 - 1
pages/follow/index.less

@@ -9,7 +9,7 @@
     box-sizing: border-box;
 
     .type {
-      padding: 10rpx 20rpx;
+      padding: 4rpx 0rpx;
       color: #666;
       font-size: 28rpx;
     }
@@ -18,6 +18,7 @@
       color: #333;
       font-weight: bold;
       font-size: 34rpx;
+      border-bottom: 6rpx solid #00C657;
     }
   }
 

+ 2 - 1
pages/follow/index.wxss

@@ -9,7 +9,7 @@
   box-sizing: border-box;
 }
 .followBox .screening .type {
-  padding: 10rpx 20rpx;
+  padding: 4rpx 0rpx;
   color: #666;
   font-size: 28rpx;
 }
@@ -17,6 +17,7 @@
   color: #333;
   font-weight: bold;
   font-size: 34rpx;
+  border-bottom: 6rpx solid #00C657;
 }
 .followBox .follow {
   margin-top: 20rpx;

+ 1 - 1
pages/pkPage/index.js

@@ -32,7 +32,7 @@ Page({
   async getreadInfo(videoId) {
     let videoInfo = await getreadInfo(videoId)
     wx.setNavigationBarTitle({
-      title: videoInfo.userRead.title
+      title: !this.data.isShare ? videoInfo.userRead.title : '推荐'
     })
     if (videoInfo.userReadExtend.resourcesType == 1) {
       this.playAudio({

+ 1 - 1
pages/pkPage/index.less

@@ -94,7 +94,7 @@
     bottom: 0px;
     left: 0px;
     width: 100%;
-    padding: 20rpx 104rpx;
+    padding: 50rpx 104rpx;
     box-sizing: border-box;
     z-index: 9;
     background-color: rgb(255, 255, 255);

+ 3 - 4
pages/pkPage/index.wxml

@@ -2,9 +2,8 @@
 <view class="pkBox">
   <videoPreview wx:if="{{videoInfo}}" videoInfo="{{videoInfo}}" currentId="{{currentId}}"
     data-id="{{videoInfo.userRead.id}}" currentTime="{{currentTime}}" sliderValue="{{sliderValue}}"
-    bind:playVideo="playVideo" bind:playAudio="playAudio" bind:pkPageAudio="pkPageAudio"
-    data-audio="{{audioPath}}" bind:setSeek="setSeek" bind:openComment="openComment"
-    videoType='pk' />
+    bind:playVideo="playVideo" bind:playAudio="playAudio" bind:pkPageAudio="pkPageAudio" data-audio="{{audioPath}}"
+    bind:setSeek="setSeek" bind:openComment="openComment" videoType='pk' />
   <!-- 挑战记录列表 -->
   <view class="pkRecord">
     <view class="title">挑战记录</view>
@@ -28,7 +27,7 @@
     </scroll-view>
   </view>
   <view class="footer" wx:if="{{isShare}}">
-    <view class="stBtn" bindtap="jumpIndex">回到首页</view>
+    <view class="stBtn" bindtap="jumpIndex">前往首页</view>
   </view>
   <Comment id="comment" bind:addCommentNum="addCommentNum" />
   <canvas id='share' type="2d"> </canvas>

+ 1 - 1
pages/pkPage/index.wxss

@@ -81,7 +81,7 @@
   bottom: 0px;
   left: 0px;
   width: 100%;
-  padding: 20rpx 104rpx;
+  padding: 50rpx 104rpx;
   box-sizing: border-box;
   z-index: 9;
   background-color: #ffffff;

+ 4 - 1
pages/works/index.js

@@ -48,10 +48,13 @@ Page({
     target
   }) {
     if (target.dataset.type) {
+      let workListDom = this.selectComponent('#worksList')
+      if (workListDom) {
+        this.selectComponent('#worksList').resetAudio()
+      }
       this.setData({
         currentType: target.dataset.type
       })
-      this.selectComponent('#worksList').resetAudio()
       this.resetData()
     }
   },

+ 8 - 7
pages/works/index.json

@@ -1,9 +1,10 @@
 {
-    "usingComponents": {
-        "navigationBar": "/components/navigationBar/index",
-        "worksList": "/components/worksList/index",
-        "banner": "/components/banner/index",
-        "emptyBg": "/components/empty/index"
-    },
-    "navigationStyle": "custom"
+  "usingComponents": {
+    "navigationBar": "/components/navigationBar/index",
+    "worksList": "/components/worksList/index",
+    "banner": "/components/banner/index",
+    "emptyBg": "/components/empty/index",
+    "activityList": "/components/activityList/index"
+  },
+  "navigationStyle": "custom"
 }

+ 3 - 3
pages/works/index.less

@@ -7,14 +7,14 @@
     z-index: 20;
 
     .type {
-      padding: 14rpx 0rpx;
-      width: 200rpx;
+      padding: 10rpx 0rpx;
+      width: 167rpx;
       box-sizing: border-box;
       text-align: center;
       border: 1rpx solid #9f9f9fa4;
       border-radius: 50rpx;
       color: #1A1A1A;
-      font-size: 28rpx;
+      font-size: 25rpx;
     }
 
     .currentType {

+ 5 - 2
pages/works/index.wxml

@@ -4,13 +4,16 @@
   <banner classify='{{currentType}}' />
   <!-- 切换类型 -->
   <view class="selectType {{isFixed?'isFixed isFixed2':''}}" style="top:{{navBarHeight}}px;" bindtap="changeType">
+    <view class="type {{currentType=='7'?'currentType':''}}" data-type='7'>排行榜</view>
     <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 id="worksList" videoType="{{currentType=='4'||currentType=='6'?'follow':'my'}}" worksList="{{list}}"
-    tabBarPadding='true' autoPlay='{{false}}' />
+  <worksList wx:if="{{currentType!='7'}}" id="worksList"
+    videoType="{{currentType=='4'||currentType=='6'?'follow':'my'}}" worksList="{{list}}" tabBarPadding='true'
+    autoPlay='{{false}}' />
+  <activityList wx:if="{{currentType=='7'}}" />
   <emptyBg wx:if="{{nullList}}"
     message="{{currentType=='4'?'您还没有关注的用户哦':currentType=='5'?'您还没有作品哦,赶快去发表吧':'您还没有收藏作品哦'}}"></emptyBg>
 </view>

+ 3 - 3
pages/works/index.wxss

@@ -6,14 +6,14 @@
   z-index: 20;
 }
 .worksBox .selectType .type {
-  padding: 14rpx 0rpx;
-  width: 200rpx;
+  padding: 10rpx 0rpx;
+  width: 167rpx;
   box-sizing: border-box;
   text-align: center;
   border: 1rpx solid #9f9f9fa4;
   border-radius: 50rpx;
   color: #1A1A1A;
-  font-size: 28rpx;
+  font-size: 25rpx;
 }
 .worksBox .selectType .currentType {
   box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;