Просмотр исходного кода

开发作品展示其他用户朗读数据

bayi 2 лет назад
Родитель
Сommit
293d767859

+ 1 - 0
app.json

@@ -15,6 +15,7 @@
     "pages/personal/index",
     "pages/childClassify/index",
     "pages/reading/index",
+    "pages/otherWork/index",
     "pages/editUser/index",
     "pages/notice/index",
     "pages/friend/index",

+ 0 - 1
components/videoPreview/index.wxml

@@ -109,7 +109,6 @@
       <view class="icon-name">{{filters.numFilter(videoInfoCopy.userRead.likeAmount)}}</view>
     </view>
   </view>
-
   <view class="pkPageBtns" style="justify-content:{{videoType!='pk'?'center':'space-between'}}"
     wx:if="{{videoType!='my'}}">
     <view class="toReading" style="background-color: #00C657;" bindtap="changeRead"

+ 19 - 0
pages/otherWork/index.js

@@ -0,0 +1,19 @@
+import {
+  getFollowWorks
+} from '~/api/works'
+import reachBottom from '~/mixins/reachBottom'
+Page({
+  behaviors: [reachBottom],
+  data: {
+
+  },
+  onLoad(options) {
+    this.resetData()
+  },
+  loadMore() {
+    this.getData(getFollowWorks, {})
+  },
+  onReachBottom() {
+    this.loadMore()
+  }
+})

+ 6 - 0
pages/otherWork/index.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "worksList": "/components/worksList/index"
+  },
+  "navigationBarTitleText": ""
+}

+ 1 - 0
pages/otherWork/index.less

@@ -0,0 +1 @@
+/* pages/otherWork/index.wxss */

+ 3 - 0
pages/otherWork/index.wxml

@@ -0,0 +1,3 @@
+<view>
+  <worksList id="worksList" videoType="follow" worksList="{{list}}" autoPlay='{{false}}' />
+</view>

+ 1 - 0
pages/otherWork/index.wxss

@@ -0,0 +1 @@
+/* pages/otherWork/index.wxss */

+ 5 - 0
pages/reading/index.js

@@ -626,6 +626,11 @@ Page({
       delta: 1
     })
   },
+  otherWork() {
+    wx.navigateTo({
+      url: "/pages/otherWork/index"
+    })
+  },
   creatShare() {
     return new Promise((resolve, reject) => {
       let video = this.data.videoInfo

+ 1 - 1
pages/reading/index.less

@@ -18,8 +18,8 @@
 
     .right {
       position: relative;
+      width: 312rpx;
       height: 100rpx;
-      flex: 1;
       display: flex;
       align-items: center;
       .moreImg {

+ 2 - 2
pages/reading/index.wxml

@@ -2,8 +2,8 @@
   <!-- 查看他人配音 -->
   <view class="moreWork">
     <view class="left">查看他人配音</view>
-    <view class="right">
-      <block wx:for="{{4}}" wx:key="index">
+    <view class="right" bindtap="otherWork">
+      <block wx:for="{{5}}" wx:key="index">
         <image class="moreImg" style="left: {{(index+1)*40}}rpx;" src="/static/more.png"></image>
       </block>
       <image src="/static/more.png" class="moreImg" />

+ 1 - 1
pages/reading/index.wxss

@@ -18,8 +18,8 @@
 }
 .readingBox .moreWork .right {
   position: relative;
+  width: 312rpx;
   height: 100rpx;
-  flex: 1;
   display: flex;
   align-items: center;
 }