This commit is contained in:
zhuchunyun 2024-08-28 20:28:31 +08:00
parent 78016f6c25
commit d655b59eaa
3 changed files with 84 additions and 43 deletions

View File

@ -33,7 +33,7 @@
</view>
<view class="f-ds">
<view class="hui-">手机号</view>
<view class="hei-">{{item.phone || 0 }}</view>
<view class="hei-">{{item.userName || 0 }}</view>
</view>
<view style="display: flex; justify-content: flex-end;" v-if="item.auditStatus == 0">
<u-button style="width: 120px;" type="success" text="同意"
@ -63,7 +63,13 @@
title: '拒绝理由',
id: null,
courseList: [],
size: ''
size: '',
optId:1,
param:{
pageNum:1,
pageSize:10,
total:0
}
}
},
onLoad(options) {
@ -80,10 +86,16 @@
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
//
if (this.courseList.length < this.param.total) {
this.param.pageNum++
if (this.optId == 1) {
this.findCourseList()
}
if (this.optId == 2) {
this.findCourseLists()
}
}
},
methods: {
@ -93,7 +105,19 @@
method: 'get'
})
this.courseList = res.data
if (res.code == 0) {
if (this.param.pageNum != 1) {
this.courseList = this.courseList.concat(res.data.records)
} else {
this.courseList = res.data.records
}
this.param.total = res.data.total
} else {
uni.showToast({
title: "网络不佳请稍后再试",
icon: 'error'
})
}
},
async findCourseLists() {
let res = await request({
@ -101,7 +125,19 @@
method: 'get'
})
this.courseList = res.data
if (res.code == 0) {
if (this.param.pageNum != 1) {
this.courseList = this.courseList.concat(res.data.records)
} else {
this.courseList = res.data.records
}
this.param.total = res.data.total
} else {
uni.showToast({
title: "网络不佳请稍后再试",
icon: 'error'
})
}
},
async reservationCourse(id) {

View File

@ -11,7 +11,7 @@
</view>
</view>
<view class="box_" v-for="(item,index) in cadetList.rows" :key="index " @click="goDetails(item.userId)">
<view class="box_" v-for="(item,index) in cadetList" :key="index " @click="goDetails(item.userId)">
<view style="display: flex;justify-content: space-between;align-items: center;">
<view class="d-s">
<view class="touxiang">
@ -64,8 +64,13 @@
},
],
keyword: '',
cadetList: []
cadetList: [],
param:{
pageNum:1,
pageSize:10,
total:0,
type:2
}
}
},
onShow() {
@ -76,48 +81,48 @@
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
//
if (this.orderList.length < this.param.total) {
this.param.pageNum++
this.findCadetList()
}
},
methods: {
async getindex(id) {
this.tabindex = id
if (id == 2) {
let res = await request({
url: '/system/pay/stuListByCoachId?type=2',
method: 'get',
})
this.cadetList = res
}
if (id == 3) {
let res = await request({
url: '/system/pay/stuListByCoachId?type=3',
method: 'get',
})
this.cadetList = res
}
this.param.type = id
this.findCadetList()
},
async changeInput() {
if (this.keyword) {
let res = await request({
url: `/system/pay/stuList?name=${this.keyword}`,
method: 'get'
})
this.cadetList = res
} else {
this.findCadetList()
}
this.param.pageNum = 1
this.param.pageSize = 10
this.param.pageNum = 1
this.param.name = this.keyword
this.cadetList= []
this.findCadetList()
},
async findCadetList() {
let res = await request({
url: '/system/pay/stuListByCoachId',
method: 'get'
method: 'get',
params:this.param
})
this.cadetList = res
if (res.code == 0) {
if (this.param.pageNum != 1) {
this.cadetList = this.cadetList.concat(res.data.records)
} else {
this.cadetList = res.data.records
}
this.param.total = res.data.total
} else {
uni.showToast({
title: "网络不佳请稍后再试",
icon: 'error'
})
}
},
goDetails(userId) {
uni.navigateTo({

View File

@ -100,7 +100,7 @@
</view>
</view>
<view class="con">
<u-empty mode="list" v-if="courseList.length == 0">
<u-empty mode="list" v-if="!courseList||courseList.length == 0">
</u-empty>
<view class="f-box" v-for="(item,index) in courseList" :key="index">
<view class="f-top">{{item.createTime}}</view>
@ -121,7 +121,7 @@
</view>
<view class="f-ds">
<view class="hui-">手机号</view>
<view class="hei-">{{item.phone}}</view>
<view class="hei-">{{item.userName}}</view>
</view>
</view>
</view>
@ -220,7 +220,7 @@
url: `/drivingSchool/system/reservationCourse/applet/getAppReservationCourseListByUserId`,
method: 'get'
})
this.courseList = res.data
this.courseList = res.data.records
},
getUserInfo() {
request({