From 78016f6c25836dcd6ae8f3b4999d377ea877cedf Mon Sep 17 00:00:00 2001 From: PQZ Date: Wed, 28 Aug 2024 19:59:38 +0800 Subject: [PATCH] 1 --- pages/teacher/orderManage.vue | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) 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); },