1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import behavior from '~/mixins/video'
- import reachBottom from '~/mixins/reachBottom'
- import share from '~/mixins/share'
- import {
- getreadInfo
- } from '~/api/video'
- import {
- getPkRecord
- } from '~/api/works'
- Page({
- behaviors: [behavior, share, reachBottom],
- data: {
- videoInfo: {},
- videoId: ''
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- console.log(options);
- let videoId = options.videoId
- this.setData({
- videoId
- })
- this.getreadInfo(videoId)
- this.resetData()
- },
- async getreadInfo(videoId) {
- let videoInfo = await getreadInfo(videoId)
- wx.setNavigationBarTitle({
- title: videoInfo.userRead.title
- })
- this.setData({
- videoInfo
- })
- },
- loadMore() {
- this.getData(getPkRecord, {
- userReadId: this.data.videoId
- })
- },
- onHide() {
- this.setData({
- currentId: ''
- })
- }
- })
|