import { createStoreBindings } from 'mobx-miniprogram-bindings' import { store } from '~/store/index' Page({ /** * 页面的初始数据 */ data: { score: {}, }, /** * 生命周期函数--监听页面加载 */ onLoad(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, }) }, backReading() { wx.redirectTo({ url: `/pages/reading/index?videoId=${this.data.score.id}&reset=true`, }) }, onShareAppMessage() { } })