import { getFansList } from '~/api/user' import reachBottom from '~/mixins/reachBottom' Page({ behaviors: [reachBottom], /** * 页面的初始数据 */ data: { currentType: 1 }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { this.resetData() }, setType({ currentTarget }) { console.log(currentTarget.dataset.type); this.setData({ currentType: currentTarget.dataset.type }) this.resetData() }, // 获取分类的内容 loadMore() { let type = this.data.currentType this.getData(getFansList, { pageSize: 20 }) }, jumpUserInfo({ currentTarget }) { let uid = currentTarget.dataset.uid wx.navigateTo({ url: `/pages/personal/index?uid=${uid}`, }) } })