Commit 2bcc4c1b authored by jyx's avatar jyx

代码优化

parent 5a8927e4
......@@ -13,7 +13,7 @@
@close='closeBeanPop'></bean-pop> -->
<recommend-pop :show='showRecommend' @close='closeRecommendPop' :bookId="bookId"></recommend-pop>
<coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="closeVipPop"
:vedioId="bookData.id" @paySuccess="paySuccess">
:vedioId="bookData.id">
</coin-popup>
</template>
</view>
......@@ -110,6 +110,10 @@
addReadRecord(this.bookId)
}
if (this.isVip() && this.bookData) {
this.paySuccess()
}
// // 用户变动,需要刷新数据
// this.$nextTick(() => {
// uni.startPullDownRefresh({})
......@@ -239,10 +243,8 @@
}
},
isVip() {
if (this.userInfo != null && this.userInfo.memberFlag) {
let cDate = new Date();
cDate = cDate.getTime();
return this.userInfo.memberExpirationDate >= cDate;
if (this.userInfo != null && this.userInfo.memberExpirationDate > 0) {
return true;
}
return false;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment