Sfoglia il codice sorgente

点击试听按钮返回到重新录制页面要加上(左下角加【退出】按钮)

bayi 2 anni fa
parent
commit
88f37ff726
4 ha cambiato i file con 37 aggiunte e 4 eliminazioni
  1. 5 2
      pages/reading/index.js
  2. 15 1
      pages/reading/index.less
  3. 4 1
      pages/reading/index.wxml
  4. 13 0
      pages/reading/index.wxss

+ 5 - 2
pages/reading/index.js

@@ -66,7 +66,6 @@ Page({
     }
   },
   onLoad(options) {
-    console.log(options);
     let videoId = options.videoId
     this.getreadInfo(videoId, options.reset)
     this.setData({
@@ -585,10 +584,14 @@ Page({
     this.resetReading()
   },
   onUnload() {
-    console.log('结束了吗22222');
     this.resetReading()
     this.storeBindings.destroyStoreBindings()
   },
+  backReading() {
+    wx.navigateBack({
+      delta: 1
+    })
+  },
   creatShare() {
     return new Promise((resolve, reject) => {
       let video = this.data.videoInfo

+ 15 - 1
pages/reading/index.less

@@ -220,6 +220,20 @@
       right: 30rpx;
       top: 20rpx;
     }
+
+    .stBtn {
+      position: absolute;
+      left: 30rpx;
+      top: 20rpx;
+      padding: 16rpx 0rpx;
+      text-align: center;
+      border-radius: 50rpx;
+      width: 220rpx;
+      font-size: 30rpx;
+      color: white;
+      background-color: #66C5FF;
+      box-shadow: 0 6px 14px 0 rgba(50, 197, 255, 0.65);
+    }
   }
 
   .playImgBg {
@@ -265,7 +279,6 @@
     }
   }
 
-
   .uploadBox {
     position: fixed;
     top: 0px;
@@ -303,6 +316,7 @@
       }
     }
   }
+
 }
 
 .scoreBoxC {

+ 4 - 1
pages/reading/index.wxml

@@ -100,7 +100,10 @@
     <image wx:else src="/static/work.png" class="playImg" bindtap="setCountDown" />
     <view class="text">
       {{state?'完成录制':readingReset?'点击重录':readingType=='public'||readingType=='readMatch'?'开始朗读':'开始挑战'}}</view>
-    <uploadFile wx:if="{{readingReset&&!uploadHide}}" class="btnPosition" />
+    <block wx:if="{{readingReset}}">
+      <uploadFile class="btnPosition" wx:if="{{!uploadHide}}" />
+      <view class="stBtn" bindtap="backReading">退出</view>
+    </block>
   </view>
   <view class="playImgBg"></view>
   <!-- 倒计时 -->

+ 13 - 0
pages/reading/index.wxss

@@ -194,6 +194,19 @@
   right: 30rpx;
   top: 20rpx;
 }
+.readingBox .controller .stBtn {
+  position: absolute;
+  left: 30rpx;
+  top: 20rpx;
+  padding: 16rpx 0rpx;
+  text-align: center;
+  border-radius: 50rpx;
+  width: 220rpx;
+  font-size: 30rpx;
+  color: white;
+  background-color: #66C5FF;
+  box-shadow: 0 6px 14px 0 rgba(50, 197, 255, 0.65);
+}
 .readingBox .playImgBg {
   position: absolute;
   width: 134rpx;