123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import {
- getOtherUser
- } from '~/api/user'
- import reachBottom from '~/mixins/reachBottom'
- Page({
- behaviors: [reachBottom],
- data: {
- text: ''
- },
- onLoad(options) {
- list: []
- },
- onShow(){
- this.resetData()
- },
- setSearch({
- detail
- }) {
- this.setData({
- text: detail.value
- })
- },
- loadMore() {
- if (!this.data.text) {
- return
- }
- this.getData(getOtherUser, {
- query: this.data.text,
- })
- },
- async setFans({
- currentTarget
- }) {
- let uid = currentTarget.dataset.uid
- wx.navigateTo({
- url: `/pages/personal/index?uid=${uid}`,
- })
- },
- onReachBottom() {
- this.loadMore()
- }
- })
|