Pārlūkot izejas kodu

样式调整加图片蒙层

bayi 2 gadi atpakaļ
vecāks
revīzija
3ece7cc821

+ 14 - 0
components/videoPreview/index.less

@@ -93,12 +93,14 @@
   }
 
   .workContent {
+    position: relative;
     font-size: 0px;
 
     .videoBox {
       position: relative;
       width: 100%;
       height: 422rpx;
+      pointer-events: auto;
 
       .maskBg {
         position: absolute;
@@ -136,9 +138,21 @@
       }
     }
 
+    .watermark {
+      position: absolute;
+      width: 100%;
+      height: 100%;
+      left: 0px;
+      top: 0px;
+      z-index: 2;
+      pointer-events: none;
+
+    }
+
     .video {
       width: 100%;
       height: 422rpx;
+      pointer-events: auto;
     }
 
     .audioBox {

+ 3 - 0
components/videoPreview/index.wxml

@@ -52,6 +52,9 @@
       <image class="play" src="/static/play-btn.png" />
       <image class="cover" src="{{videoInfoCopy.userRead.coverImg}}" />
     </view>
+    <!-- 视频水印 -->
+    <image src="{{videoInfoCopy.readMaskTemplate.imgPath}}" class="watermark"
+      wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}" bindtap="playVideo" />
     <!-- 播放时渲染的video -->
     <video class="video" id="myVideo" wx:if="{{videoInfoCopy.userRead.id==currentId}}"
       src="{{videoInfoCopy.userRead.videoPath}}" autoplay="true" object-fit="contain">

+ 12 - 0
components/videoPreview/index.wxss

@@ -79,12 +79,14 @@
   margin-right: 20rpx;
 }
 .work .workContent {
+  position: relative;
   font-size: 0px;
 }
 .work .workContent .videoBox {
   position: relative;
   width: 100%;
   height: 422rpx;
+  pointer-events: auto;
 }
 .work .workContent .videoBox .maskBg {
   position: absolute;
@@ -117,9 +119,19 @@
   width: 100%;
   height: 100%;
 }
+.work .workContent .watermark {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0px;
+  top: 0px;
+  z-index: 2;
+  pointer-events: none;
+}
 .work .workContent .video {
   width: 100%;
   height: 422rpx;
+  pointer-events: auto;
 }
 .work .workContent .audioBox {
   position: relative;

+ 10 - 10
pages/childClassify/index.less

@@ -89,8 +89,8 @@
 
         .audioCover {
           position: relative;
-          width: 144rpx;
-          height: 80rpx;
+          width: 230rpx;
+          height: 128rpx;
           display: flex;
           align-items: center;
           justify-content: center;
@@ -100,22 +100,22 @@
           background-position: center;
 
           .audioPlayBg {
-            width: 70rpx;
-            height: 70rpx;
+            width: 100rpx;
+            height: 100rpx;
           }
 
           .audioPlayZhen {
             position: absolute;
-            right: 32rpx;
-            top: 12rpx;
-            width: 16rpx;
-            height: 22rpx;
+            right: 52rpx;
+            top: 20rpx;
+            width: 24rpx;
+            height: 30rpx;
           }
 
           .cover {
             position: absolute;
-            width: 60rpx;
-            height: 60rpx;
+            width: 84rpx;
+            height: 84rpx;
             border-radius: 50%;
           }
         }

+ 10 - 10
pages/childClassify/index.wxss

@@ -82,8 +82,8 @@
 }
 .classBox .worksList .worksBox .left .audioCover {
   position: relative;
-  width: 144rpx;
-  height: 80rpx;
+  width: 230rpx;
+  height: 128rpx;
   display: flex;
   align-items: center;
   justify-content: center;
@@ -93,20 +93,20 @@
   background-position: center;
 }
 .classBox .worksList .worksBox .left .audioCover .audioPlayBg {
-  width: 70rpx;
-  height: 70rpx;
+  width: 100rpx;
+  height: 100rpx;
 }
 .classBox .worksList .worksBox .left .audioCover .audioPlayZhen {
   position: absolute;
-  right: 32rpx;
-  top: 12rpx;
-  width: 16rpx;
-  height: 22rpx;
+  right: 52rpx;
+  top: 20rpx;
+  width: 24rpx;
+  height: 30rpx;
 }
 .classBox .worksList .worksBox .left .audioCover .cover {
   position: absolute;
-  width: 60rpx;
-  height: 60rpx;
+  width: 84rpx;
+  height: 84rpx;
   border-radius: 50%;
 }
 .classBox .worksList .worksBox .left .work {

+ 1 - 1
pages/reading/index.js

@@ -150,7 +150,7 @@ Page({
     let child = this.selectComponent('#readingTips').data
     // 判断是否有权限朗读 不是vip并且没有朗读机会
     const isVip = child.vipTime ? true : false
-    if (!isVip && child.userInfo.experienceAmount == 0) {
+    if (!isVip && child.userInfo.experienceAmount <= 0) {
       return this.selectComponent('#readingTips').showModal();
     }
     if (this.data.state) {