123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import {
- createStoreBindings
- } from 'mobx-miniprogram-bindings'
- import {
- store
- } from '~/store/index'
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- score: {},
- // 目前用来处理区分上传普通作品还是朗读赛作品
- readingType: ''
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- console.log(options);
- this.storeBindings = createStoreBindings(this, {
- store,
- fields: {
- userInfo: 'userInfo',
- readDetail: 'readDetail'
- },
- })
- this.storeBindings.updateStoreBindings()
- let score = this.data.readDetail
- wx.setNavigationBarTitle({
- title: score.title
- })
- this.setData({
- score,
- readingType: options.readingType ? options.readingType : ''
- })
- },
- backReading() {
- wx.redirectTo({
- url: `/pages/reading/index?videoId=${this.data.score.id}&reset=true`,
- })
- },
- onShareAppMessage() {
- }
- })
|