This commit is contained in:
PQZ 2024-08-28 18:48:03 +08:00
commit 480f53e0c6
2 changed files with 34 additions and 30 deletions

View File

@ -27,14 +27,14 @@
<view class="b-s" @click="goDetails(item.id)"> <view class="b-s" @click="goDetails(item.id)">
<view class="w-d-s"> <view class="w-d-s">
<view class="hei_">{{item.experienceYear}}</view> <view class="hei_">{{item.experienceYear||0}}</view>
<view class="hui_">教龄</view> <view class="hui_">教龄</view>
</view> </view>
<view class="w-d-s" @click="goDetails(item.id)"> <view class="w-d-s" @click="goDetails(item.id)">
<view class="hei_">{{item.student}}</view> <view class="hei_">{{item.student||0}}</view>
<view class="hui_">学员数量</view> <view class="hui_">学员数量</view>
</view> </view>
@ -95,8 +95,8 @@
method: 'get', method: 'get',
params: this.queryParams params: this.queryParams
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 0) {
this.dataList = res.rows this.dataList = res.data
} }
}) })
}, },

View File

@ -114,25 +114,27 @@
listData: ["全部订单", "已报名", "已付款", "已面签"], listData: ["全部订单", "已报名", "已付款", "已面签"],
listDataIndex: 0, listDataIndex: 0,
orderList: [], orderList: [],
isState: false isState: false,
param:{
pageNum:1,
pageSize:10,
total:0
}
} }
}, },
// open(){
// this.$refs.popup.open('top')
// },
onShow() { onShow() {
this.findOrderListByState(0) this.findOrderListByState(this.tabindex)
}, },
onPullDownRefresh() { onPullDownRefresh() {
console.log("刷新"); console.log("刷新");
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onReachBottom() { onReachBottom() {
// this.show = true //
setTimeout(() => { if (this.orderList.length < this.param.total) {
console.log("加载执行"); this.param.pageNum++
}, 2000) this.findOrderListByState(this.tabindex)
}
}, },
methods: { methods: {
@ -142,31 +144,33 @@
let state = null let state = null
let isSign = null let isSign = null
if (index == 1) { if (index == 1) {
state = 3 this.param.state = 3
} else if (index == 2) { } else if (index == 2) {
state = 3 this.param.state = 3
} else if (index == 3) { } else if (index == 3) {
state = 3 this.param.state = 3
isSign = 1 this.param.isSign = 1
} }
let res = await request({ let res = await request({
url: `/system/pay/list`, url: `/system/pay/list`,
method: 'get', method: 'get',
params: { params: this.param
isSign: isSign,
state: state,
pageNum:1,
pageSize:10
}
}) })
if (res.code == 0) {
this.orderList = res.data.records 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'
})
}
}, },
// getindex(index) {
// this.tabindex = index
// },
goDetails(id) { goDetails(id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/index/orderDetails?id=${id}` url: `/pages/index/orderDetails?id=${id}`