Parcourir la source

联调活动列表跳转

bayi il y a 2 ans
Parent
commit
d9667734ab

+ 96 - 84
components/activityList/index.js

@@ -1,91 +1,103 @@
 import {
-    getActivities
+  getActivities
 } from '~/api/global'
 Component({
-    properties: {},
-    /**
-     * 组件的初始数据
-     */
-    data: {
-        //,2:邀新榜,3:热播榜,4:挑战pk榜,5,朗读赛
-        type: '4',
-        activityList: [],
-        dsqList: []
+  properties: {},
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    //,2:邀新榜,3:热播榜,4:挑战pk榜,5,朗读赛
+    type: '4',
+    activityList: [],
+    dsqList: []
+  },
+  lifetimes: {
+    attached() {
+      this.getActivities()
     },
-    lifetimes: {
-        attached() {
-            this.getActivities()
-        },
-        detached() {
-            this.data.dsqList.forEach(item => {
-                clearInterval(item)
-            })
+    detached() {
+      this.data.dsqList.forEach(item => {
+        clearInterval(item)
+      })
+    }
+  },
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    async getActivities() {
+      let activityList = await getActivities()
+      this.setData({
+        activityList
+      })
+      // 下面这个处理限时活动的,第一版先不上
+      /*  res.forEach((item, index) => {
+         this.activityTimeOut(item.closing, index)
+       }) */
+    },
+    activityTimeOut(oTime, index) {
+      let inputTime = new Date(oTime)
+      let dsq = setInterval(() => {
+        var nowTime = new Date();
+        //把剩余时间毫秒数转化为秒
+        var times = (inputTime - nowTime) / 1000;
+        if (times <= 0) {
+          this.setData({
+            [`activityList[${index}].hour`]: '00',
+            [`activityList[${index}].minute`]: '00',
+            [`activityList[${index}].second`]: '00',
+          })
+          return clearInterval(dsq)
         }
+        //计算小时数 转化为整数
+        var h = parseInt(times / 60 / 60 % 24);
+        //如果小时数小于 10,要变成 0 + 数字的形式 赋值给盒子
+        let hour = h < 10 ? "0" + h : h;
+        //计算分钟数 转化为整数
+        var m = parseInt(times / 60 % 60);
+        //如果分钟数小于 10,要变成 0 + 数字的形式 赋值给盒子
+        let minute = m < 10 ? "0" + m : m;
+        //计算描述 转化为整数
+        var s = parseInt(times % 60);
+        //如果秒钟数小于 10,要变成 0 + 数字的形式 赋值给盒子
+        let second = s < 10 ? "0" + s : s;
+        this.setData({
+          [`activityList[${index}].hour`]: hour,
+          [`activityList[${index}].minute`]: minute,
+          [`activityList[${index}].second`]: second,
+        })
+        times = --times;
+      }, 1000);
+      this.setData({
+        dsqList: [...this.data.dsqList, dsq]
+      })
     },
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-        async getActivities() {
-            let activityList = await getActivities()
-            this.setData({
-                activityList
-            })
-            // 下面这个处理限时活动的,第一版先不上
-            /*  res.forEach((item, index) => {
-               this.activityTimeOut(item.closing, index)
-             }) */
-        },
-        activityTimeOut(oTime, index) {
-            let inputTime = new Date(oTime)
-            let dsq = setInterval(() => {
-                var nowTime = new Date();
-                //把剩余时间毫秒数转化为秒
-                var times = (inputTime - nowTime) / 1000;
-                if (times <= 0) {
-                    this.setData({
-                        [`activityList[${index}].hour`]: '00',
-                        [`activityList[${index}].minute`]: '00',
-                        [`activityList[${index}].second`]: '00',
-                    })
-                    return clearInterval(dsq)
-                }
-                //计算小时数 转化为整数
-                var h = parseInt(times / 60 / 60 % 24);
-                //如果小时数小于 10,要变成 0 + 数字的形式 赋值给盒子
-                let hour = h < 10 ? "0" + h : h;
-                //计算分钟数 转化为整数
-                var m = parseInt(times / 60 % 60);
-                //如果分钟数小于 10,要变成 0 + 数字的形式 赋值给盒子
-                let minute = m < 10 ? "0" + m : m;
-                //计算描述 转化为整数
-                var s = parseInt(times % 60);
-                //如果秒钟数小于 10,要变成 0 + 数字的形式 赋值给盒子
-                let second = s < 10 ? "0" + s : s;
-                this.setData({
-                    [`activityList[${index}].hour`]: hour,
-                    [`activityList[${index}].minute`]: minute,
-                    [`activityList[${index}].second`]: second,
-                })
-                times = --times;
-            }, 1000);
-            this.setData({
-                dsqList: [...this.data.dsqList, dsq]
-            })
-        },
-        activityEvent({
-            currentTarget
-        }) {
-            //1:图片,2:邀新榜,3:热播榜,4:挑战pk榜,5,朗读赛,6,领取勋章
-            let {
-                type,
-                id
-            } = currentTarget.dataset
-            if ([2, 3, 4].includes(type)) {
-                wx.navigateTo({
-                    url: `/pages/ranking/index?id=${id}&type=${type}`,
-                })
-            }
-        },
-    }
+    activityEvent({
+      currentTarget
+    }) {
+      //1:图片,2:邀新榜,3:热播榜,4:挑战pk榜,5,朗读赛,6,领取勋章
+      let {
+        type,
+        id,
+        title,
+        explain
+      } = currentTarget.dataset.info
+      if (type == 1) {
+        wx.navigateTo({
+          url: `/pages/rankIntro/index?title=${title}&img=${explain}`,
+        })
+      }
+      if (type == 5) {
+        wx.navigateTo({
+          url: `/pages/match/index`,
+        })
+      }
+      if ([2, 3, 4].includes(type)) {
+        wx.navigateTo({
+          url: `/pages/ranking/index?id=${id}&type=${type}`,
+        })
+      }
+    },
+  }
 })

+ 75 - 77
components/activityList/index.wxml

@@ -1,6 +1,6 @@
 <wxs src="../../utils/filter.wxs" module="filters" />
 <view class="activityList">
-    <!--  <view class="activityBox" wx:for="{{activityList}}" wx:key="id">
+  <!--  <view class="activityBox" wx:for="{{activityList}}" wx:key="id">
     <image src="" class="cover" />
     <view class="footer">
       <view class="info">
@@ -16,84 +16,82 @@
       <view class="btn {{item.second=='00'?'closingBtn':''}}">立即参与</view>
     </view>
   </view> -->
-    <block wx:for="{{activityList}}" wx:key="id">
-        <view class="activityBox" wx:if="{{item.bannerType==1}}">
-            <image src="{{item.icon}}" class="cover" />
-            <view class="footer">
-                <view class="info">
-                    <view class="title">{{item.title}}</view>
-                    <view class="time">{{filters.formatDate(item.startTime,2)}}—{{filters.formatDate(item.endTime,2)}}
-                    </view>
-                </view>
-                <view class="btn" bindtap="activityEvent" data-type='{{item.type}}' data-id="{{item.id}}">立即参与</view>
-            </view>
+  <block wx:for="{{activityList}}" wx:key="id">
+    <view class="activityBox" wx:if="{{item.bannerType==1}}">
+      <image src="{{item.icon}}" class="cover" />
+      <view class="footer">
+        <view class="info">
+          <view class="title">{{item.title}}</view>
+          <view class="time">{{filters.formatDate(item.startTime,2)}}—{{filters.formatDate(item.endTime,2)}}
+          </view>
         </view>
-        <view class="ranking-class-1" wx:if="{{item.bannerType==2}}">
-            <view class="header">
-                <view class="title">{{item.title}}</view>
-                <view class="toAll" bindtap="activityEvent" data-type='{{item.type}}' data-id="{{item.id}}">查看全部
-                    <image src="/static/black.png" class="backIcon" />
-                </view>
+        <view class="btn" bindtap="activityEvent" data-info="{{item}}">立即参与</view>
+      </view>
+    </view>
+    <view class="ranking-class-1" wx:if="{{item.bannerType==2}}">
+      <view class="header">
+        <view class="title">{{item.title}}</view>
+        <view class="toAll" bindtap="activityEvent" data-info="{{item}}">查看全部
+          <image src="/static/black.png" class="backIcon" />
+        </view>
+      </view>
+      <view class="body">
+        <view class="top">
+          <view class="userBox">
+            <view class="secondUser">
+              <image src="{{item.userList[1].avatar}}" class="avatar" />
+            </view>
+            <view class="nickName textOver">{{item.userList[1].nickName||item.userList[1].eid}}</view>
+          </view>
+          <view class="userBox">
+            <view class="firstUser">
+              <image src="{{item.userList[0].avatar}}" class="avatar" />
             </view>
-            <view class="body">
-                <view class="top">
-                    <view class="userBox">
-                        <view class="secondUser">
-                            <image src="{{item.userList[1].avatar}}" class="avatar" />
-                        </view>
-                        <view class="nickName textOver">{{item.userList[1].nickName||item.userList[1].eid}}</view>
-                    </view>
-                    <view class="userBox">
-                        <view class="firstUser">
-                            <image src="{{item.userList[0].avatar}}" class="avatar" />
-                        </view>
-                        <view class="nickName textOver">{{item.userList[0].nickName||item.userList[0].eid}}</view>
-                    </view>
-                    <view class="userBox">
-                        <view class="thirdUser">
-                            <image src="{{item.userList[2].avatar}}" class="avatar" />
-                        </view>
-                        <view class="nickName textOver">{{item.userList[2].nickName||item.userList[2].eid}}</view>
-                    </view>
-                </view>
-                <view class="btm">
-                    <view class="userBox" wx:for="{{5}}" wx:key="index" wx:for-item="items">
-                        <image src="{{item.userList[index+3].avatar}}" class="avatar" />
-                        <view class="nickName textOver">
-                            {{item.userList[index+3].nickName||item.userList[index+3].eid||'请你来挑战'}}
-                        </view>
-                    </view>
-                </view>
+            <view class="nickName textOver">{{item.userList[0].nickName||item.userList[0].eid}}</view>
+          </view>
+          <view class="userBox">
+            <view class="thirdUser">
+              <image src="{{item.userList[2].avatar}}" class="avatar" />
             </view>
+            <view class="nickName textOver">{{item.userList[2].nickName||item.userList[2].eid}}</view>
+          </view>
+        </view>
+        <view class="btm">
+          <view class="userBox" wx:for="{{5}}" wx:key="index" wx:for-item="items">
+            <image src="{{item.userList[index+3].avatar}}" class="avatar" />
+            <view class="nickName textOver">
+              {{item.userList[index+3].nickName||item.userList[index+3].eid||'请你来挑战'}}
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="ranking-class-2 {{item.type=='1'?'yxb':item.type=='3'?'rbb':'pkb'}}" wx:if="{{item.bannerType==3}}">
+      <view class="header">
+        <view class="left">
+          <image src="{{item.type=='1'?'/static/yxb.png':item.type=='3'?'/static/rbb.png':'/static/pkb.png'}}"
+            class="icon" />
+          <view class="title">{{item.title}}</view>
         </view>
-        <view class="ranking-class-2 {{item.type=='1'?'yxb':item.type=='3'?'rbb':'pkb'}}"
-            wx:if="{{item.bannerType==3}}">
-            <view class="header">
-                <view class="left">
-                    <image src="{{item.type=='1'?'/static/yxb.png':item.type=='3'?'/static/rbb.png':'/static/pkb.png'}}"
-                        class="icon" />
-                    <view class="title">{{item.title}}</view>
-                </view>
-                <view class="toAll" bindtap="activityEvent" data-type='{{item.type}}' data-id="{{item.id}}">查看全部
-                    <image src="/static/rBtn.png" class="backIcon" />
-                </view>
+        <view class="toAll" bindtap="activityEvent" data-info="{{item}}">查看全部
+          <image src="/static/rBtn.png" class="backIcon" />
+        </view>
+      </view>
+      <view class="body">
+        <view class="row" wx:for="{{3}}" wx:key="index" wx:for-item='items'>
+          <view class="left">
+            <image src="/static/{{index+1}}-1.png" class="stand" />
+            <image src="{{item.userList[index].avatar}}" class="avatar" />
+            <view class="nickName textOver">{{item.userList[index].nickName||item.userList[index].eid}}
             </view>
-            <view class="body">
-                <view class="row" wx:for="{{3}}" wx:key="index" wx:for-item='items'>
-                    <view class="left">
-                        <image src="/static/{{index+1}}-1.png" class="stand" />
-                        <image src="{{item.userList[index].avatar}}" class="avatar" />
-                        <view class="nickName textOver">{{item.userList[index].nickName||item.userList[index].eid}}
-                        </view>
-                    </view>
-                    <view class="right">
-                        <image
-                            src="{{item.type=='1'?'/static/yx.png':item.type=='3'?'/static/play.png':'/static/win.png'}}"
-                            class="playIcon" />
-                        <view class="num">{{item.userList[index].count}}</view>
-                    </view>
-                </view>
-                <!--  <view class="row">
+          </view>
+          <view class="right">
+            <image src="{{item.type=='1'?'/static/yx.png':item.type=='3'?'/static/play.png':'/static/win.png'}}"
+              class="playIcon" />
+            <view class="num">{{item.userList[index].count}}</view>
+          </view>
+        </view>
+        <!--  <view class="row">
           <view class="left">
             <image src="/static/2-1.png" class="stand" />
             <image src="/static/play-big.png" class="avatar" />
@@ -117,7 +115,7 @@
             <view class="num">186</view>
           </view>
         </view> -->
-            </view>
-        </view>
-    </block>
+      </view>
+    </view>
+  </block>
 </view>

+ 98 - 101
components/videoPreview/index.wxml

@@ -1,110 +1,107 @@
 <wxs src="../../utils/filter.wxs" module="filters" />
 <view class="work">
-    <view class="workHead">
-        <view class="wH-left">
-            <image src="{{videoInfoCopy.user.avatar}}" class="avatar" bindtap="jumpUserInfo" />
-            <view class="wH-left-user">
-                <view class="nickname textOver">{{videoInfoCopy.user.nickName||videoInfoCopy.user.eid}}</view>
-                <view class="time">{{videoInfoCopy.userRead.day}}</view>
-            </view>
-        </view>
-        <view class="wH-right" wx:if="{{videoType=='my'&&videoInfo.userRead.status!='CHECK'}}">
-            <view class="wH-right-btn" bindtap="download">
-                <image class="img" src="/static/down.png" mode="" />
-                <view class="text">下载</view>
-            </view>
-            <view class="wH-right-btn" bindtap="delete">
-                <image class=" img" style="width:24rpx" src="/static/delete.png" mode="" />
-                <view class="text">删除</view>
-            </view>
-            <view class="wH-right-btn" bindtap="setVideoPublic">
-                <image class="img" style="width:30rpx"
-                    src="{{videoInfoCopy.userRead.status==='NORMAL'? '/static/unlock.png': '/static/lock.png'}}" />
-                <view class="text">
-                    {{videoInfoCopy.userRead.status==='NORMAL'? '公开': '私密'}}
-                </view>
-            </view>
-        </view>
-        <view class="wH-right"
-            wx:elif="{{videoType=='public'&&selfUid!=videoInfoCopy.user.uid||videoType=='excellent'&&selfUid!=videoInfoCopy.user.uid}}">
-            <view class="follow {{videoInfoCopy.isFans?'isFans':''}}" bindtap="setFans">
-                <image src="{{videoInfoCopy.isFans?'/static/follow_2.png':'/static/follow_1.png'}}" class="character"
-                    mode="" />
-                <text class="text">{{videoInfoCopy.isFans?'已关注':'关注'}}</text>
-            </view>
-        </view>
-        <view class="wH-right" wx:elif="{{videoType=='pk'}}">
-            <view class="pkNum">
-                {{videoInfoCopy.userRead.score||'暂无评'}}分
-            </view>
-        </view>
+  <view class="workHead">
+    <view class="wH-left">
+      <image src="{{videoInfoCopy.user.avatar}}" class="avatar" bindtap="jumpUserInfo" />
+      <view class="wH-left-user">
+        <view class="nickname textOver">{{videoInfoCopy.user.nickName||videoInfoCopy.user.eid}}</view>
+        <view class="time">{{videoInfoCopy.userRead.day}}</view>
+      </view>
     </view>
-    <!-- 视频 -->
-    <view class="workContent" wx:if="{{!videoInfoCopy.userReadExtend||videoInfoCopy.userReadExtend.resourcesType==0}}">
-        <!-- 审核中遮罩 -->
-        <view class="videoBox" wx:if="{{videoInfoCopy.userRead.status=='CHECK'&&videoInfoCopy.userRead.id!=currentId}}">
-            <view class="maskBg"></view>
-            <image class="maskImg" src="/static/checking.png" />
-            <image class="cover" src="{{videoInfoCopy.userRead.coverImg}}" />
-        </view>
-        <!--未播放-->
-        <view class="videoBox" wx:if="{{videoInfoCopy.userRead.status!='CHECK'&&videoInfoCopy.userRead.id!=currentId}}"
-            bindtap="playVideo">
-            <image class="play" src="/static/play-btn.png" />
-            <image class="cover" src="{{videoInfoCopy.userRead.coverImg}}" />
+    <view class="wH-right" wx:if="{{videoType=='my'&&videoInfo.userRead.status!='CHECK'}}">
+      <view class="wH-right-btn" bindtap="download">
+        <image class="img" src="/static/down.png" mode="" />
+        <view class="text">下载</view>
+      </view>
+      <view class="wH-right-btn" bindtap="delete">
+        <image class=" img" style="width:24rpx" src="/static/delete.png" mode="" />
+        <view class="text">删除</view>
+      </view>
+      <view class="wH-right-btn" bindtap="setVideoPublic">
+        <image class="img" style="width:30rpx"
+          src="{{videoInfoCopy.userRead.status==='NORMAL'? '/static/unlock.png': '/static/lock.png'}}" />
+        <view class="text">
+          {{videoInfoCopy.userRead.status==='NORMAL'? '公开': '私密'}}
         </view>
-        <!-- 播放时渲染的video -->
-        <video class="video" id="myVideo" wx:if="{{videoInfoCopy.userRead.id==currentId}}"
-            src="{{videoInfoCopy.userRead.videoPath}}" autoplay="true" object-fit="contain">
-        </video>
+      </view>
     </view>
-    <!-- 音频 -->
-    <view class="workContent" wx:else>
-        <view class="audioBox" bindtap="audioPlay">
-            <image src="/static/readingNow.gif" class="readingTips" wx:if="{{videoInfoCopy.userRead.id==currentId}}" />
-            <image src=" {{videoInfoCopy.userReadExtend.backgroundVirtualImg}}" class="audioBg" mode="aspectFill" />
-            <view class="audioPlay">
-                <image src="/static/audioBg.png"
-                    class="audioPlayBg {{videoInfoCopy.userRead.id==currentId?'circle':''}}" />
-                <image src="/static/zhen.png" class="audioPlayZhen" />
-                <image src="{{videoInfoCopy.userRead.coverImg}}"
-                    class="cover {{videoInfoCopy.userRead.id==currentId?'circle':''}}" />
-            </view>
-            <view class="titleBox">
-                <view class="textOver" wx:for="{{videoInfoCopy.userRead.title}}" wx:key="index">
-                    {{item}}
-                </view>
-            </view>
-        </view>
+    <view class="wH-right"
+      wx:elif="{{videoType=='public'&&selfUid!=videoInfoCopy.user.uid||videoType=='excellent'&&selfUid!=videoInfoCopy.user.uid}}">
+      <view class="follow {{videoInfoCopy.isFans?'isFans':''}}" bindtap="setFans">
+        <image src="{{videoInfoCopy.isFans?'/static/follow_2.png':'/static/follow_1.png'}}" class="character" mode="" />
+        <text class="text">{{videoInfoCopy.isFans?'已关注':'关注'}}</text>
+      </view>
     </view>
-    <view class="workFooter" wx:if="{{videoInfo.userRead.status!='CHECK'}}">
-        <button class="resetBtn mangeL-box" open-type="share" data-info='{{videoInfo}}'>
-            <image src="/static/share.png" mode="" class="icon" />
-            <view class="icon-name">分享</view>
-        </button>
-        <view class="mangeL-box" bindtap="collect">
-            <image src="{{videoInfoCopy.isFavorites ? '/static/star_colored.png' : '/static/star.png'}}" mode=""
-                class="icon" />
-            <view class="icon-name">{{videoInfoCopy.isFavorites?'已收藏':'收藏'}}</view>
-        </view>
-        <view class="mangeL-box" bindtap="openComment">
-            <image src="/static/comment.png" mode="" class="icon" />
-            <view class="icon-name">{{filters.numFilter(videoInfoCopy.userRead.commentAmount)}}</view>
-        </view>
-        <view class="mangeL-box" bindtap="likeVideo">
-            <image src="{{videoInfoCopy.isLike ? '/static/heart_colored.png' : '/static/heart.png'}}" mode=""
-                class="icon" />
-            <view class="icon-name">{{filters.numFilter(videoInfoCopy.userRead.likeAmount)}}</view>
-        </view>
+    <view class="wH-right" wx:elif="{{videoType=='pk'}}">
+      <view class="pkNum">
+        {{videoInfoCopy.userRead.score?videoInfoCopy.userRead.score+'分':''}}
+      </view>
     </view>
-    <block wx:if="{{videoType!='my'}}">
-        <view class="toReading" bindtap="toPkPage" wx:if="{{videoInfo.userRead.type=='READ'}}">
-            <image src="/static/reading.png" class="reading" mode="" />
-            <view class="reading-text">挑战PK</view>
-        </view>
-        <view class="toReading" bindtap="toPkPage" wx:if="{{videoInfo.userRead.type=='EXAMPLE'}}">
-            <image src="/static/reading.png" class="reading" mode="" />
-            <view class="reading-text">去朗读</view>
+  </view>
+  <!-- 视频 -->
+  <view class="workContent" wx:if="{{!videoInfoCopy.userReadExtend||videoInfoCopy.userReadExtend.resourcesType==0}}">
+    <!-- 审核中遮罩 -->
+    <view class="videoBox" wx:if="{{videoInfoCopy.userRead.status=='CHECK'&&videoInfoCopy.userRead.id!=currentId}}">
+      <view class="maskBg"></view>
+      <image class="maskImg" src="/static/checking.png" />
+      <image class="cover" src="{{videoInfoCopy.userRead.coverImg}}" />
+    </view>
+    <!--未播放-->
+    <view class="videoBox" wx:if="{{videoInfoCopy.userRead.status!='CHECK'&&videoInfoCopy.userRead.id!=currentId}}"
+      bindtap="playVideo">
+      <image class="play" src="/static/play-btn.png" />
+      <image class="cover" src="{{videoInfoCopy.userRead.coverImg}}" />
+    </view>
+    <!-- 播放时渲染的video -->
+    <video class="video" id="myVideo" wx:if="{{videoInfoCopy.userRead.id==currentId}}"
+      src="{{videoInfoCopy.userRead.videoPath}}" autoplay="true" object-fit="contain">
+    </video>
+  </view>
+  <!-- 音频 -->
+  <view class="workContent" wx:else>
+    <view class="audioBox" bindtap="audioPlay">
+      <image src="/static/readingNow.gif" class="readingTips" wx:if="{{videoInfoCopy.userRead.id==currentId}}" />
+      <image src=" {{videoInfoCopy.userReadExtend.backgroundVirtualImg}}" class="audioBg" mode="aspectFill" />
+      <view class="audioPlay">
+        <image src="/static/audioBg.png" class="audioPlayBg {{videoInfoCopy.userRead.id==currentId?'circle':''}}" />
+        <image src="/static/zhen.png" class="audioPlayZhen" />
+        <image src="{{videoInfoCopy.userRead.coverImg}}"
+          class="cover {{videoInfoCopy.userRead.id==currentId?'circle':''}}" />
+      </view>
+      <view class="titleBox">
+        <view class="textOver" wx:for="{{videoInfoCopy.userRead.title}}" wx:key="index">
+          {{item}}
         </view>
-    </block>
+      </view>
+    </view>
+  </view>
+  <view class="workFooter" wx:if="{{videoInfo.userRead.status!='CHECK'}}">
+    <button class="resetBtn mangeL-box" open-type="share" data-info='{{videoInfo}}'>
+      <image src="/static/share.png" mode="" class="icon" />
+      <view class="icon-name">分享</view>
+    </button>
+    <view class="mangeL-box" bindtap="collect">
+      <image src="{{videoInfoCopy.isFavorites ? '/static/star_colored.png' : '/static/star.png'}}" mode=""
+        class="icon" />
+      <view class="icon-name">{{videoInfoCopy.isFavorites?'已收藏':'收藏'}}</view>
+    </view>
+    <view class="mangeL-box" bindtap="openComment">
+      <image src="/static/comment.png" mode="" class="icon" />
+      <view class="icon-name">{{filters.numFilter(videoInfoCopy.userRead.commentAmount)}}</view>
+    </view>
+    <view class="mangeL-box" bindtap="likeVideo">
+      <image src="{{videoInfoCopy.isLike ? '/static/heart_colored.png' : '/static/heart.png'}}" mode="" class="icon" />
+      <view class="icon-name">{{filters.numFilter(videoInfoCopy.userRead.likeAmount)}}</view>
+    </view>
+  </view>
+  <block wx:if="{{videoType!='my'}}">
+    <view class="toReading" bindtap="toPkPage" wx:if="{{videoInfo.userRead.type=='READ'}}">
+      <image src="/static/reading.png" class="reading" mode="" />
+      <view class="reading-text">挑战PK</view>
+    </view>
+    <view class="toReading" bindtap="toPkPage" wx:if="{{videoInfo.userRead.type=='EXAMPLE'}}">
+      <image src="/static/reading.png" class="reading" mode="" />
+      <view class="reading-text">去朗读</view>
+    </view>
+  </block>
 </view>

+ 10 - 6
components/worksList/index.less

@@ -1,9 +1,13 @@
-.playLine {
-  position: fixed;
-  z-index: 999;
-  width: 100%;
-  height: 1rpx;
-  background-color: transparent;
+.worksList {
+  padding-bottom: 100px;
+
+  .playLine {
+    position: fixed;
+    z-index: 999;
+    width: 100%;
+    height: 1rpx;
+    background-color: transparent;
+  }
 }
 
 .share {

+ 4 - 1
components/worksList/index.wxss

@@ -1,4 +1,7 @@
-.playLine {
+.worksList {
+  padding-bottom: 100px;
+}
+.worksList .playLine {
   position: fixed;
   z-index: 999;
   width: 100%;

+ 4 - 2
pages/personal/index.js

@@ -45,9 +45,11 @@ Page({
   // 关注
   async setFans() {
     let newLike = !this.data.userInfo.like
-    await setFans({
-      uid: this.data.userInfo.user.uid
+    let res = await setFans({
+      uid: this.data.userInfo.user.uid,
+      // fanId:
     }, 'put')
+    console.log(res);
     this.setData({
       ['userInfo.like']: newLike
     })

+ 0 - 5
pages/works/index.less

@@ -1,5 +1,4 @@
 .worksBox {
-  min-height: 100vh;
   .selectType {
     padding: 30rpx 15rpx 30rpx 26rpx;
     display: flex;
@@ -37,8 +36,4 @@
       }
     }
   }
-
-  .empty {
-    margin-top: 90rpx;
-  }
 }

+ 0 - 6
pages/works/index.wxss

@@ -1,6 +1,3 @@
-.worksBox {
-  min-height: 100vh;
-}
 .worksBox .selectType {
   padding: 30rpx 15rpx 30rpx 26rpx;
   display: flex;
@@ -34,6 +31,3 @@
   width: 26rpx;
   height: 26rpx;
 }
-.worksBox .empty {
-  margin-top: 90rpx;
-}