|
@@ -71,17 +71,15 @@ Page({
|
|
|
activityId: '',
|
|
|
isVip: false
|
|
|
},
|
|
|
- async onLoad(options) {
|
|
|
+ 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) {
|
|
|
+ if (options.voluntarily && this.data.isVip) {
|
|
|
this.setCountDown()
|
|
|
}
|
|
|
if (options.autoPlay) {
|
|
@@ -94,7 +92,6 @@ Page({
|
|
|
readingType: options.readingType || 'public',
|
|
|
uploadHide: options.uploadHide,
|
|
|
activityId: options.activityId || '',
|
|
|
- isVip
|
|
|
})
|
|
|
// 手工绑定
|
|
|
this.storeBindings = createStoreBindings(this, {
|
|
@@ -189,6 +186,17 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ this.getVipInfo()
|
|
|
+ },
|
|
|
+ // 获取是否vip
|
|
|
+ async getVipInfo() {
|
|
|
+ let isVip = await getVipInfo()
|
|
|
+ console.log(isVip, '111');
|
|
|
+ this.setData({
|
|
|
+ isVip
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取阅读内容
|
|
|
getreadInfo(videoId, reset = false) {
|
|
|
return new Promise(async (resolve, reject) => {
|
|
@@ -225,7 +233,7 @@ Page({
|
|
|
},
|
|
|
// 开始录制
|
|
|
setCountDown() {
|
|
|
- if (this.data.isVip) {
|
|
|
+ if (!this.data.isVip) {
|
|
|
return wx.navigateTo({
|
|
|
url: '/pages/commodity/index',
|
|
|
})
|