分页
This commit is contained in:
parent
1b1aa4f04f
commit
c9cd20ba9e
@ -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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -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}`
|
||||||
|
Loading…
Reference in New Issue
Block a user