@@ -18,6 +18,12 @@ Component({
* 组件的方法列表
*/
methods: {
+ open() {
+ // this.getVipInfo()
+ this.setData({
+ show: true
+ })
+ },
closeModal() {
this.setData({
show: false
@@ -43,7 +43,7 @@
background-size: cover;
-webkit-box-reflect: below 2rpx linear-gradient(to bottom, transparent 92%, rgba(0, 0, 0, 0.3));
- .buyBtn {
+ /* .buyBtn {
width: 254rpx;
text-align: center;
position: absolute;
@@ -53,7 +53,7 @@
font-size: 26rpx;
font-weight: bold;
letter-spacing: 2rpx;
- }
+ } */
}
.payBox2 {
@@ -4,18 +4,17 @@
<view class="h1">您还不是VIP会员</view>
<view>选择下面的会员卡开通后使用!</view>
</view>
- <view class="payBox" wx:if="{{!vipTime||vipTime=='1'}}">
- <!-- <view class="buyBtn" bindtap="toBuy" data-id="{{products[0].id}}">
- {{ !vipTime?'立即开通':'终身使用'}}
- </view> -->
- </view>
- <view class="payBox payBox2" wx:if="{{vipTime!='1'}}">
- <!-- <view class="buyBtn" bindtap="toBuy" data-id="{{products[1].id}}" wx:if="{{!vipTime}}">立即开通
+ <template wx:if="{{!vipTime}}">
+ <view class="payBox">
- <view class="buyBtn" style="font-size: 22rpx;" wx:else>
- 有效期:{{filters.formatDate(vipTime,5)}}
+ <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> -->
+ </template>
<image src="/static/lollipop.png" class="close" catchtap="closeModal" />
@@ -40,17 +40,17 @@
background: url(http://reader-wx.ai160.com/images/reader/v3/learn/SVIPpop.png);
-}
-.buyVip .modal .payBox .buyBtn {
- width: 254rpx;
- text-align: center;
- position: absolute;
- left: 90rpx;
- top: 156rpx;
- color: #39029B;
- font-size: 26rpx;
- font-weight: bold;
- letter-spacing: 2rpx;
+ width: 254rpx;
+ text-align: center;
+ position: absolute;
+ left: 90rpx;
+ top: 156rpx;
+ color: #39029B;
+ font-size: 26rpx;
+ font-weight: bold;
+ letter-spacing: 2rpx;
.buyVip .modal .payBox2 {
background: url(http://reader-wx.ai160.com/images/reader/v3/learn/VIPpop.png);
@@ -234,8 +234,7 @@ Page({
// 开始录制
setCountDown() {
if (!this.data.isVip) {
-
- return
+ return this.selectComponent('#buyVip').open()
/* let child = this.selectComponent('#readingTips').data
// 判断是否有权限朗读 不是vip并且没有朗读机会
@@ -146,8 +146,8 @@
</page-container>
+ <buyVip id="buyVip" />
<canvas id='share' type="2d"> </canvas>
- <buyVip />
<vipModal id="vipModal"></vipModal>
<canvas id='vip' type="2d"> </canvas>