|
@@ -55,12 +55,12 @@ Page({
|
|
|
num: 3,
|
|
|
},
|
|
|
contentH: 0,
|
|
|
+ percent: 0,
|
|
|
scrollTop: 0,
|
|
|
//如果readingReset为true就是重读
|
|
|
readingReset: false,
|
|
|
//readingType为public是普通阅读,为pk是pk逻辑,readMatch为朗读赛
|
|
|
readingType: 'public',
|
|
|
- percent: 0,
|
|
|
uploadState: false,
|
|
|
article: [],
|
|
|
silderData: {
|
|
@@ -70,6 +70,8 @@ Page({
|
|
|
},
|
|
|
// 朗读赛的id
|
|
|
activityId: '',
|
|
|
+ // 是否免费
|
|
|
+ free: false,
|
|
|
isVip: false
|
|
|
},
|
|
|
onLoad(options) {
|
|
@@ -93,6 +95,7 @@ Page({
|
|
|
readingType: options.readingType || 'public',
|
|
|
uploadHide: options.uploadHide,
|
|
|
activityId: options.activityId || '',
|
|
|
+ free: options.free || false
|
|
|
})
|
|
|
// 手工绑定
|
|
|
this.storeBindings = createStoreBindings(this, {
|
|
@@ -234,18 +237,12 @@ Page({
|
|
|
},
|
|
|
// 开始录制
|
|
|
setCountDown() {
|
|
|
- if (!this.data.isVip) {
|
|
|
+ if (!this.data.isVip && !this.data.free) {
|
|
|
this.resetReading()
|
|
|
return this.selectComponent('#buyVip').open({
|
|
|
isVip: this.data.isVip
|
|
|
})
|
|
|
}
|
|
|
- /* let child = this.selectComponent('#readingTips').data
|
|
|
- // 判断是否有权限朗读 不是vip并且没有朗读机会
|
|
|
- const isVip = child.vipTime ? true : false
|
|
|
- if (!isVip && child.userInfo.experienceAmount <= 0) {
|
|
|
- return this.selectComponent('#readingTips').showModal();
|
|
|
- } */
|
|
|
if (this.data.state) {
|
|
|
this.resetReading()
|
|
|
return
|
|
@@ -413,7 +410,7 @@ Page({
|
|
|
})
|
|
|
if (this.data.readingType == 'public' || this.data.readingType == 'readMatch') {
|
|
|
wx.navigateTo({
|
|
|
- url: `/pages/score/index?readingType=${this.data.readingType}&activityId=${this.data.activityId}`,
|
|
|
+ url: `/pages/score/index?readingType=${this.data.readingType}&activityId=${this.data.activityId}&free=${this.data.free}`,
|
|
|
events: {
|
|
|
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
|
|
|
goback: (data) => {
|