|
@@ -7,6 +7,7 @@ import {
|
|
|
import {
|
|
|
getModelTexts,
|
|
|
getReadRanking,
|
|
|
+ getActivityInfo,
|
|
|
getSelfReadRanking
|
|
|
} from '~/api/global'
|
|
|
import {
|
|
@@ -17,7 +18,6 @@ import {
|
|
|
} from 'mobx-miniprogram-bindings'
|
|
|
import share from '~/mixins/share'
|
|
|
Page({
|
|
|
- // behaviors: [share],
|
|
|
/**
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
@@ -29,16 +29,26 @@ Page({
|
|
|
modelList: [],
|
|
|
myActivityUser: {},
|
|
|
activityId: '',
|
|
|
- bannerList: []
|
|
|
+ bannerList: [],
|
|
|
+ //1是收费0是免费
|
|
|
+ free: 1
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad(options) {
|
|
|
- // console.log(decodeURIComponent(options.scene));
|
|
|
+ console.log(options);
|
|
|
this.setData({
|
|
|
activityId: options.activityId
|
|
|
})
|
|
|
+ getActivityInfo(options.activityId).then(res => {
|
|
|
+ let {
|
|
|
+ free
|
|
|
+ } = res
|
|
|
+ this.setData({
|
|
|
+ free
|
|
|
+ })
|
|
|
+ })
|
|
|
this.getLocUserInfo()
|
|
|
if (Object.keys(this.data.userInfo).length > 0) {
|
|
|
this.reload()
|
|
@@ -102,7 +112,7 @@ Page({
|
|
|
target
|
|
|
}) {
|
|
|
wx.navigateTo({
|
|
|
- url: `/pages/reading/index?videoId=${target.dataset.id}&activityId=${this.data.activityId}&readingType=readMatch&autoPlay=true&free=true`
|
|
|
+ url: `/pages/reading/index?videoId=${target.dataset.id}&activityId=${this.data.activityId}&readingType=readMatch&autoPlay=true&free=${this.data.free}`
|
|
|
})
|
|
|
},
|
|
|
jumpUserInfo({
|