1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import {
- getSelfRead
- } from '~/api/user'
- import reachBottom from '~/mixins/reachBottom'
- Page({
- behaviors: [reachBottom],
- /**
- * 页面的初始数据
- */
- data: {
- list: [],
- // true是人气榜,false是参赛作品
- currentType: true,
- bannerList: [{
- id: 1,
- url: "https://efunimgs.ai160.com/xyyf/banner/voucher.png"
- }, {
- id: 2,
- url: "https://efunimgs.ai160.com/xyyf/banner/course.png"
- }, {
- id: 3,
- url: "https://efunimgs.ai160.com/xyyf/banner/video.png"
- }, {
- id: 4,
- url: "https://efunimgs.ai160.com/xyyf/banner/topic.png"
- }]
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- this.loadMore()
- },
- bannelEvent() {},
- selectType({
- target
- }) {
- if (target.dataset.type) {
- this.setData({
- currentType: JSON.parse(target.dataset.type)
- })
- }
- },
- loadMore() {
- this.getData(getSelfRead)
- },
- onReachBottom() {
- this.loadMore()
- },
- onShareAppMessage() {
- }
- })
|