Quellcode durchsuchen

开发及调整

bayi vor 2 Jahren
Ursprung
Commit
7da79a52a9

+ 3 - 3
components/videoPreview/index.wxml

@@ -9,8 +9,8 @@
       </view>
     </view>
     <!-- 用户本人作品的右侧 -->
-    <view class="wH-right" wx:if="{{videoType=='my'&&videoInfoCopy.userRead.status!='CHECK'}}">
-      <view class="wH-right-btn" bindtap="download">
+    <view class="wH-right" wx:if="{{videoType=='my'}}">
+      <view class="wH-right-btn" bindtap="download" wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}">
         <image class="img" src="/static/down.png" mode="" />
         <view class="text">下载</view>
       </view>
@@ -18,7 +18,7 @@
         <image class=" img" style="width:24rpx" src="/static/delete.png" mode="" />
         <view class="text">删除</view>
       </view>
-      <view class="wH-right-btn" bindtap="setVideoPublic">
+      <view class="wH-right-btn" bindtap="setVideoPublic" wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}">
         <image class="img" style="width:30rpx"
           src="{{videoInfoCopy.userRead.status==='NORMAL'? '/static/unlock.png': '/static/lock.png'}}" />
         <view class="text">

+ 3 - 1
pages/childClassify/index.js

@@ -20,6 +20,7 @@ Page({
     currentIndex: 0,
     scrollTop: 0,
     text: '',
+    currentId: ''
   },
   /**
    * 生命周期函数--监听页面加载
@@ -68,7 +69,8 @@ Page({
   }) {
     this.setData({
       scrollTop: 0,
-      currentIndex: currentTarget.dataset.index
+      currentIndex: currentTarget.dataset.index,
+      currentId: `class${currentTarget.dataset.index}`
     })
     this.resetData()
   },

+ 3 - 3
pages/childClassify/index.wxml

@@ -1,9 +1,9 @@
 <wxs src="../../utils/filter.wxs" module="filters" />
 <view class="classBox">
-  <scroll-view class="classify" scroll-x="true" enhanced show-scrollbar="{{false}}"
+  <scroll-view class="classify" scroll-x="true" scroll-into-view="{{currentId}}" enhanced show-scrollbar="{{false}}"
     wx:if="{{type=='class'&&!childType}}">
-    <view class="name {{currentIndex==index?'currentClass':''}}" wx:for="{{categoryList}}" wx:key="id"
-      data-index="{{index}}" bindtap="setClass">
+    <view id="{{'class'+index}}" class="name {{currentIndex==index?'currentClass':''}}" wx:for="{{categoryList}}"
+      wx:key="id" data-index="{{index}}" bindtap="setClass">
       {{item.title}}
     </view>
   </scroll-view>

+ 0 - 2
pages/index/index.less

@@ -30,8 +30,6 @@
       width: 100%;
       white-space: nowrap;
       background-color: white;
-
-
       .firstBox {
         text-align: center;
         display: inline-block;

+ 4 - 4
pages/reading/index.js

@@ -155,9 +155,9 @@ Page({
   // 获取阅读内容
   async getreadInfo(videoId, reset = false) {
     let videoInfo = await getreadInfo(videoId)
-    wx.setNavigationBarTitle({
-      title: videoInfo.userRead.title
-    })
+    /*  wx.setNavigationBarTitle({
+       title: videoInfo.userRead.title
+     }) */
     let data = JSON.parse(videoInfo.userReadExtend.lessonText)
     data = data.map((item, index) => {
       item.time = Number(item.time)
@@ -192,7 +192,7 @@ Page({
     let child = this.selectComponent('#readingTips').data
     // 判断是否有权限朗读 不是vip并且没有朗读机会
     const isVip = child.vipTime ? true : false
-    if (!isVip && child.userInfo.experienceAmount <= 0 && this.data.readingType != 'readMatch') {
+    if (!isVip && child.userInfo.experienceAmount <= 0) {
       return this.selectComponent('#readingTips').showModal();
     }
     if (this.data.state) {

+ 2 - 1
pages/reading/index.json

@@ -2,5 +2,6 @@
   "usingComponents": {
     "uploadFile": "/components/uploadFile/index",
     "readingTips": "/components/readingTips/index"
-  }
+  },
+  "navigationBarTitleText": ""
 }