bayi 2 lat temu
rodzic
commit
5a85343610

+ 1 - 2
components/navigationBar/index.less

@@ -96,11 +96,10 @@
 
         .submitBox {
             text-align: center;
-
             .submit {
                 width: 360rpx;
                 margin-top: 60rpx;
-                padding: 14rpx 0px;
+                padding: 14rpx 0rpx;
                 display: inline-block;
                 background-color: #45B7FF;
                 color: white;

+ 1 - 2
components/navigationBar/index.wxml

@@ -14,8 +14,7 @@
   <view class="headerBg" style="top:{{navBarHeight}}px;"></view>
 </block>
 
-<view wx:if="{{isGradeShow}}" class="gradeContainer" catchtouchmove='true'
-  style="margin-top:{{showNav?navBarHeight:0}}px;" bindtap="closeGrade">
+<view wx:if="{{isGradeShow}}" class="gradeContainer" catchtouchmove='true' bindtap="closeGrade">
   <view class="gradeBox zoomIn" catchtap="selectGrade">
     <view class="title">请选择年级</view>
     <view class="content">

+ 1 - 1
components/navigationBar/index.wxss

@@ -90,7 +90,7 @@
 .gradeContainer .gradeBox .submitBox .submit {
   width: 360rpx;
   margin-top: 60rpx;
-  padding: 14rpx 0px;
+  padding: 14rpx 0rpx;
   display: inline-block;
   background-color: #45B7FF;
   color: white;

+ 2 - 2
pages/my/index.wxml

@@ -75,8 +75,8 @@
     <view class="copywriting" wx:if="{{vipTime}}">
       {{vipTime==1?'终身使用':filters.formatDate(vipTime,4)}}
     </view>
-    <view class="goPay" bindtap='jump' data-url="/pages/commodity/index" wx:if="{{!vipTime}}">
-      立即开通
+    <view wx:if="{{vipTime!='1'}}" class="goPay" bindtap='jump' data-url="/pages/commodity/index">
+      {{vipTime!=''?'立即续费':'立即开通'}}
     </view>
   </view>
 </view>

+ 14 - 2
pages/reading/index.js

@@ -8,6 +8,9 @@ import {
   postWorksScore
 } from '~/api/works'
 import {
+  getVipInfo
+} from '~/api/user'
+import {
   userEvent
 } from '~/api/global'
 import {
@@ -66,13 +69,16 @@ Page({
     },
     // 朗读赛的id
     activityId: '',
+    isVip: false
   },
-  onLoad(options) {
+  async onLoad(options) {
     console.log(options);
     let videoId = options.videoId
     wx.setNavigationBarTitle({
       title: options.navBarTitle
     })
+    let isVip = await getVipInfo()
+    console.log(isVip);
     this.getreadInfo(videoId, options.reset).then(res => {
       wx.nextTick(() => {
         if (options.voluntarily) {
@@ -87,7 +93,8 @@ Page({
       readingReset: options.reset || false,
       readingType: options.readingType || 'public',
       uploadHide: options.uploadHide,
-      activityId: options.activityId || ''
+      activityId: options.activityId || '',
+      isVip
     })
     // 手工绑定 
     this.storeBindings = createStoreBindings(this, {
@@ -218,6 +225,11 @@ Page({
   },
   // 开始录制
   setCountDown() {
+    if (this.data.isVip) {
+      return wx.navigateTo({
+        url: '/pages/commodity/index',
+      })
+    }
     /* let child = this.selectComponent('#readingTips').data
     // 判断是否有权限朗读 不是vip并且没有朗读机会
     const isVip = child.vipTime ? true : false