Browse Source

开发联调分类页

bayi 2 years ago
parent
commit
651b09eef9

+ 4 - 2
pages/childClassify/index.js

@@ -73,9 +73,11 @@ Page({
   goRead({
     currentTarget
   }) {
+    console.log(
+      currentTarget.dataset
+    );
     wx.navigateTo({
-      // url: `/pages/reading/index?videoId=${currentTarget.dataset.id}&readingType=pk`
-      url: `/pages/reading/index?videoId=1610706272332508`
+      url: `/pages/reading/index?videoId=${currentTarget.dataset.id}`
     })
   },
   bindscrolltolower() {

+ 18 - 12
pages/childClassify/index.less

@@ -71,7 +71,7 @@
       display: flex;
       align-items: center;
       justify-content: space-between;
-      padding: 26rpx 20rpx;
+      padding: 28rpx 20rpx;
       box-sizing: border-box;
       background-color: white;
       border-radius: 20rpx;
@@ -97,20 +97,26 @@
             margin-bottom: 10rpx;
           }
 
-          .statistic {
+          .statistics {
             display: flex;
             align-items: center;
-            justify-content: space-between;
 
-            .playImg {
-              width: 34rpx;
-              height: 28rpx;
-              margin-right: 6rpx;
-            }
-
-            .num {
-              font-size: 26rpx;
-              color: #666666;
+            .statistic {
+              display: flex;
+              align-items: center;
+              justify-content: space-between;
+              margin-right: 14rpx;
+
+              .playImg {
+                width: 30rpx;
+                height: 30rpx;
+                margin-right: 6rpx;
+              }
+
+              .num {
+                font-size: 26rpx;
+                color: #666666;
+              }
             }
           }
         }

+ 6 - 2
pages/childClassify/index.wxml

@@ -23,13 +23,17 @@
           <view class="title">{{item.title}}</view>
           <view class="statistics">
             <view class="statistic">
-              <image src="/static/play.png" class="playImg" mode="" />
+              <image src="/static/zp.png" class="playImg" mode="" />
+              <view class="num">{{filters.numFilter(item.playAmount)|| 0}}</view>
+            </view>
+            <view class="statistic">
+              <image src="/static/play2.png" class="playImg" mode="" />
               <view class="num">{{filters.numFilter(item.playAmount)|| 0}}</view>
             </view>
           </view>
         </view>
       </view>
-      <view class="goRead" data-id="{{index}}" bindtap="goRead">去朗读</view>
+      <view class="goRead" data-id="{{item.id}}" bindtap="goRead">去朗读</view>
     </view>
   </scroll-view>
 </view>

+ 11 - 6
pages/childClassify/index.wxss

@@ -64,7 +64,7 @@
   display: flex;
   align-items: center;
   justify-content: space-between;
-  padding: 26rpx 20rpx;
+  padding: 28rpx 20rpx;
   box-sizing: border-box;
   background-color: white;
   border-radius: 20rpx;
@@ -88,17 +88,22 @@
   font-weight: bold;
   margin-bottom: 10rpx;
 }
-.classBox .worksList .worksBox .left .work .statistic {
+.classBox .worksList .worksBox .left .work .statistics {
+  display: flex;
+  align-items: center;
+}
+.classBox .worksList .worksBox .left .work .statistics .statistic {
   display: flex;
   align-items: center;
   justify-content: space-between;
+  margin-right: 14rpx;
 }
-.classBox .worksList .worksBox .left .work .statistic .playImg {
-  width: 34rpx;
-  height: 28rpx;
+.classBox .worksList .worksBox .left .work .statistics .statistic .playImg {
+  width: 30rpx;
+  height: 30rpx;
   margin-right: 6rpx;
 }
-.classBox .worksList .worksBox .left .work .statistic .num {
+.classBox .worksList .worksBox .left .work .statistics .statistic .num {
   font-size: 26rpx;
   color: #666666;
 }

+ 3 - 4
pages/reading/index.js

@@ -134,8 +134,7 @@ Page({
     this.setData({
       videoInfo
     })
-    // if(videoInfo.userReadExtend){
-    if (false) {
+    if (!this.data.videoInfo.userReadExtend) {
       this.videoContext = wx.createVideoContext('myVideo')
     } else {
       this.innerAudioContext = wx.createInnerAudioContext();
@@ -350,7 +349,7 @@ Page({
   },
   // 控制视频或音频的播放状态
   playMediaState() {
-    if (this.data.videoInfo.userReadExtend) {
+    if (!this.data.videoInfo.userReadExtend) {
       this.videoContext.play()
     } else {
       this.innerAudioContext.play();
@@ -358,7 +357,7 @@ Page({
   },
   // 控制视频或音频的暂停状态
   stopMediaState() {
-    if (this.data.videoInfo.userReadExtend) {
+    if (!this.data.videoInfo.userReadExtend) {
       this.videoContext.stop()
       this.videoContext.seek(0)
     } else {

BIN
static/play2.png