Browse Source

开发水印穿透

bayi 2 years ago
parent
commit
9df2ba619c
3 changed files with 4 additions and 3 deletions
  1. 2 2
      components/videoPreview/index.wxml
  2. 1 1
      components/worksList/index.wxml
  3. 1 0
      mixins/video.js

+ 2 - 2
components/videoPreview/index.wxml

@@ -54,9 +54,9 @@
       <image class="cover" src="{{videoInfoCopy.userRead.coverImg}}" />
     </view>
     <!-- 视频水印 -->
-    <!--   <image src="{{videoInfoCopy.readMaskTemplate.imgPath}}" class="watermark"
+    <image src="{{videoInfoCopy.readMaskTemplate.imgPath}}" class="watermark"
       style="pointer-events:{{videoInfoCopy.userRead.status!='CHECK'&&videoInfoCopy.userRead.id!=currentId?'auto':'none'}}"
-      bindtap="playVideo" wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}" /> -->
+      bindtap="playVideo" wx:if="{{videoInfoCopy.userRead.status!='CHECK'}}" />
     <!-- 播放时渲染的video -->
     <video class="video" id="myVideo" wx:if="{{videoInfoCopy.userRead.id==currentId}}"
       src="{{videoInfoCopy.userRead.videoPath}}" autoplay="true" object-fit="contain">

+ 1 - 1
components/worksList/index.wxml

@@ -4,7 +4,7 @@
     videoInfo="{{item}}" index='{{index}}' currentId="{{currentId}}" data-id="{{item.userRead.id}}"
     data-audio="{{item.userRead.audioPath}}"
     data-type="{{!item.userReadExtend||item.userReadExtend.resourcesType==0?0:1}}" bind:openComment="openComment"
-    bind:setListFans="setListFans" bind:playAudio="playAudio" bind:deleteVideo='deleteVideo'>
+    bind:setListFans="setListFans" bind:playAudio="playAudio" bind:playVideo="playVideo" bind:deleteVideo='deleteVideo'>
   </videoPreview>
   <Comment id="comment" tabBarPadding="{{tabBarPadding}}" bind:addCommentNum="addCommentNum" />
   <canvas id='share' class="share" type="2d"> </canvas>

+ 1 - 0
mixins/video.js

@@ -13,6 +13,7 @@ module.exports = Behavior({
     playVideo({
       currentTarget
     }) {
+      console.log('zzz');
       this.setData({
         currentId: currentTarget.dataset.id
       })