|
@@ -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
|