Browse Source

Merge branch 'main' of http://git.mokasz.com/maomao/mini_read_space_front

hank 1 year ago
parent
commit
c0d65dcb03
5 changed files with 48 additions and 2 deletions
  1. BIN
      assets/images/icon-lock.png
  2. 9 1
      pages/video/detail.wxml
  3. 15 0
      pages/video/detail.wxss
  4. 9 1
      pages/video/video.wxml
  5. 15 0
      pages/video/video.wxss

BIN
assets/images/icon-lock.png


+ 9 - 1
pages/video/detail.wxml

@@ -72,12 +72,20 @@
                 mode="aspectFill"
               />
               <view class="play-button-container">
-                <view class="play-button">
+                <view class="play-button" wx:if="{{ !item.lock }}">
                   <image
                     class="play-icon"
                     src="/assets/images/icon-video-play.png"
                   ></image>
                 </view>
+
+                <view class="play-button-lock" wx:else>
+                  <image
+                    class="play-icon"
+                    src="/assets/images/icon-lock.png"
+                  ></image>
+                  <view class="play-button-lock-title">观看广告解锁完整内容</view>
+                </view>
               </view>
             </view>
   

+ 15 - 0
pages/video/detail.wxss

@@ -437,6 +437,21 @@ page {
   justify-content: center;
 }
 
+.play-button-lock {
+  /* width: 100rpx; */
+  height: 100rpx;
+  text-align: center;
+  /* display: flex;
+  align-items: center;
+  justify-content: center; */
+}
+
+.play-button-lock-title {
+  width: 100%;
+  color: yellow;
+  font-weight: 600;
+}
+
 .play-icon {
   width: 100rpx;
   height: 100rpx;

+ 9 - 1
pages/video/video.wxml

@@ -46,12 +46,20 @@
                 mode="aspectFill"
               />
               <view class="play-button-container">
-                <view class="play-button">
+                <view class="play-button" wx:if="{{ !item.lock }}">
                   <image
                     class="play-icon"
                     src="/assets/images/icon-video-play.png"
                   ></image>
                 </view>
+
+                <view class="play-button-lock" wx:else>
+                  <image
+                    class="play-icon"
+                    src="/assets/images/icon-lock.png"
+                  ></image>
+                  <view class="play-button-lock-title">观看广告解锁完整内容</view>
+                </view>
               </view>
             </view>
 

+ 15 - 0
pages/video/video.wxss

@@ -134,6 +134,21 @@
   justify-content: center;
 }
 
+.play-button-lock {
+  /* width: 100rpx; */
+  height: 100rpx;
+  text-align: center;
+  /* display: flex;
+  align-items: center;
+  justify-content: center; */
+}
+
+.play-button-lock-title {
+  width: 100%;
+  color: yellow;
+  font-weight: 600;
+}
+
 .play-icon {
   width: 100rpx;
   height: 100rpx;