1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import {
- getFansList
- } from '~/api/user'
- import reachBottom from '~/mixins/reachBottom'
- Page({
- behaviors: [reachBottom],
- /**
- * 页面的初始数据
- */
- data: {
- // 1我的关注;2我的粉丝
- currentType: 1
- },
- onShow() {
- this.resetData()
- },
- setType({
- currentTarget
- }) {
- this.setData({
- currentType: currentTarget.dataset.type
- })
- this.resetData()
- },
- // 获取分类的内容
- loadMore() {
- let type = this.data.currentType
- this.getData(getFansList, {
- pageSize: 20,
- type
- })
- },
- jumpUserInfo({
- currentTarget
- }) {
- let uid = currentTarget.dataset.uid
- wx.navigateTo({
- url: `/pages/personal/index?uid=${uid}`,
- })
- },
- })
|