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
})
精简前代码
精简后代码