@@ -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%;