task#11332,司机app分页

This commit is contained in:
2024-02-26 13:50:26 +08:00
parent 8be3ac3625
commit 1c8b0a12a9

View File

@ -11,7 +11,7 @@
@click-left="goBack"
/>
</div>
<div style="height: 83px">
<div :style="{ 'height': activeIndex == 0 ? '83px' : '42px' }">
<div class="tab_wrap">
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
@click="changeTab(index)">
@ -104,15 +104,20 @@ export default {
methods:{
async onLoad(){
console.log('onLoadonLoadonLoadonLoadonLoad')
/*this.pageNum++;
await this.getList()
this.loading = false;
if (this.pageList.length >= this.total) {
this.finished = true;
}*/
return
}
this.pageNum++;
await this.getList()
this.loading = false;
},
async clickHandle(index){
this.monthIndex=index
this.pageNum=1
this.total=0
this.pageList=[]
await this.getList()
this.submitData=[]
},
@ -147,9 +152,11 @@ export default {
},
async changeTab(index) {
this.activeIndex = index
this.total = 0;
this.pageNum = 1
this.orderList = [];
this.pageList = [];
this.total=0
this.loading=false
this.finished=false
await this.getList()
},
goDetail(id){
@ -173,7 +180,15 @@ export default {
type: this.activeIndex+1
})
}
this.pageList=res.data
// this.pageList=res.data
this.total=res.total
if(this.pageNum == 1){// 第一页直接赋值
this.pageList=res.data
}else{// 第二页数据拼接
let preList = this.pageList;
let arr = res.data;
this.pageList = preList.concat(arr)
}
if(this.activeIndex==0){
this.pageList.forEach(item => {
this.$set(item,'isSelected',false)
@ -293,15 +308,17 @@ export default {
color: #FFFFFF;
}
}
/*::v-deep .van-pull-refresh{
height: calc(100% - 91px) ;
}*/
/*.firstpullRefresh{
/*
.firstpullRefresh{
height: calc(100% - 140px) ;
}
.secondpullRefresh{
height: calc(100% - 91px) ;
}*/
::v-deep .van-list__finished-text{
padding-bottom: 70px;
background-color: #F4F5F7;
}
.listWrap{
//@include wh(100%,100%);
width: 100%;