uni-app 小程序数据列表进行分页


// 上拉加载更多
moreData() { var that = this; that.page += 1; var parm = { rows:that.rows, page:that.page } this.requestToken('接口路径?statusList='+ that.statusList, 'POST', parm, (res) => { var array = res.data.Data.rows var listValue = [] listValue = array.map((item)=>{ return item }) if(res.data.Data.total<that.rows) { console.log('res.data.Data.tatal:',res.data.Data.total) that.showNext = true return } listValue.map(function(item){ that.repairlist.push(item) }) // console.log(res) }) },
//原本的数据列表
var parm = { rows:that.rows, page:that.page, } console.log(that.statusList) this.requestToken('接口路径?statusList='+that.statusList, 'POST', parm, (res) => { that.repairlist = res.data.Data.rows console.log(that.repairlist) console.log('报修单', res) }, () => { that.loading = false })
return {
     page:1,
     rows:30,
     statusList:''  
}  

 

上一篇:我对递归的使用


下一篇:python 不同参数选择不同函数