react-native 上拉加载

写之前要先确定翻页的方式,

  • 有 page  
    Http.post('/api/v1/auto/strategy/history', {
    page: clean ? 1 : this.state.page + 1,
    pers: 10,
    }).
  • 有 id
    Http.post('/api/v1/token/withdrawList', {
    id: clean ? 0 : this.state.lastId,
    pers: 3,
    ...values,
    end_time: (values && values.end_time) ? moment(values.end_time).add(1, 'd').format('YYYY-MM-DD 00:00:00') : undefined,
    })
  • 有 current   
    Http.post('/api/app/vip/friendBonus', {
    current: clean ? 1 : this.state.page + 1,
    size: 10,
    startTime: this.state.effectiveTime.startDate,
    endTime: this.state.effectiveTime.endDate
    })

 

 

精简前代码
精简后代码

 

posted @ 2019-11-26 17:01  一路向北√  阅读(254)  评论(0编辑  收藏  举报

web应用开发&研究 -

业精于勤而荒于嬉。

工作,使我快乐。


Font Awesome | Respond.js | Bootstrap中文网