diff --git a/pages/teacher/orderManage.vue b/pages/teacher/orderManage.vue index cd3b0ed..036fa8a 100644 --- a/pages/teacher/orderManage.vue +++ b/pages/teacher/orderManage.vue @@ -94,7 +94,12 @@ listData: ["全部订单", "已报名", "已付款", "已面签"], listDataIndex: 0, orderList: [], - isState: false + isState: false, + param:{ + pageNum:1, + pageSize:10, + total:0 + } } }, // open(){ @@ -114,6 +119,13 @@ console.log("加载执行"); }, 2000) }, + onReachBottom() { + // 触底加载 + if (this.orderList.length < this.param.total) { + this.param.pageNum++ + this.findOrderListByState(this.tabindex) + } + }, methods: { @@ -131,8 +143,21 @@ let res = await request({ url: '/drivingSchool/system/pass/checkList', method: 'get', + params: this.param }) - this.orderList = res.rows + if (res.code == 0) { + if (this.param.pageNum != 1) { + this.orderList = this.orderList.concat(res.data.records) + } else { + this.orderList = res.data.records + } + this.param.total = res.data.total + } else { + uni.showToast({ + title: "网络不佳请稍后再试", + icon: 'error' + }) + } console.log(e); },