bayi 1 năm trước cách đây
mục cha
commit
e2944b35e5

+ 6 - 5
pages/reading/buyVip/index.js

@@ -1,4 +1,3 @@
-// pages/reading/buyVip/index.js
 Component({
     /**
      * 组件的属性列表
@@ -11,17 +10,19 @@ Component({
      * 组件的初始数据
      */
     data: {
-        show: false
+        show: false,
+        vipTime: ''
     },
 
     /**
      * 组件的方法列表
      */
     methods: {
-        open() {
-            // this.getVipInfo()
+        open(vipTime) {
+            console.log(vipTime);
             this.setData({
-                show: true
+                show: true,
+                vipTime
             })
         },
         closeModal() {

+ 1 - 1
pages/reading/buyVip/index.less

@@ -1,6 +1,6 @@
 .buyVip {
     position: fixed;
-    z-index: 10;
+    z-index: 12;
     left: 0rpx;
     top: 0rpx;
     width: 100vw;

+ 7 - 7
pages/reading/buyVip/index.wxml

@@ -4,17 +4,17 @@
             <view class="h1">您还不是VIP会员</view>
             <view>选择下面的会员卡开通后使用!</view>
         </view>
-        <template wx:if="{{!vipTime}}">
-            <view class="payBox">
-            </view>
-            <view class="payBox payBox2">
-                <!--    <view class="buyBtn" bindtap="toBuy" data-id="{{products[1].id}}" wx:if="{{!vipTime}}">立即开通
+        <!-- <template> -->
+        <view class="payBox">
+        </view>
+        <view class="payBox payBox2">
+            <!--    <view class="buyBtn" bindtap="toBuy" data-id="{{products[1].id}}" wx:if="{{!vipTime}}">立即开通
                 </view>
                 <view class="buyBtn" style="font-size: 22rpx;" wx:else>
                     有效期:{{filters.formatDate(vipTime,5)}}
                 </view> -->
-            </view>
-        </template>
+        </view>
+        <!-- </template> -->
     </view>
     <image src="/static/lollipop.png" class="close" catchtap="closeModal" />
 </view>

+ 1 - 1
pages/reading/buyVip/index.wxss

@@ -1,6 +1,6 @@
 .buyVip {
   position: fixed;
-  z-index: 10;
+  z-index: 12;
   left: 0rpx;
   top: 0rpx;
   width: 100vw;

+ 5 - 2
pages/reading/index.js

@@ -234,7 +234,10 @@ Page({
     // 开始录制
     setCountDown() {
         if (!this.data.isVip) {
-            return this.selectComponent('#buyVip').open()
+            this.resetReading()
+            return this.selectComponent('#buyVip').open({
+                vipTime: this.data.isVip
+            })
         }
         /* let child = this.selectComponent('#readingTips').data
         // 判断是否有权限朗读 不是vip并且没有朗读机会
@@ -298,7 +301,7 @@ Page({
                 attachAudioUrl: 1,
                 result: {
                     details: {
-                        gop_adjust: -0.1
+                        gop_adjust: -0.1 //评测系数
                     }
                 }
             },