This commit is contained in:
PQZ 2024-08-28 17:56:08 +08:00
commit c5d361e593
2 changed files with 37 additions and 21 deletions

View File

@ -1,15 +1,15 @@
<template> <template>
<view class="content"> <view class="content">
<view class="top-"> <view class="top-">
<u-search @change="findCadetList()" placeholder="请输入搜索内容" v-model="keyword"></u-search> <u-search @change="changeInput()" placeholder="请输入搜索内容" v-model="param.name"></u-search>
</view> </view>
<view class="g_"> <view class="g_">
{{cadetList.total}} {{param.total}}
</view> </view>
<u-empty mode="list" v-if="cadetList.total == 0"> <u-empty mode="list" v-if="cadetList.total == 0">
</u-empty> </u-empty>
<view class="box_" v-for="(item,index) in cadetList.rows" :key="index "> <view class="box_" v-for="(item,index) in cadetList" :key="index ">
<view style="display: flex;align-items: center; <view style="display: flex;align-items: center;
justify-content: space-between;width: 100%;"> justify-content: space-between;width: 100%;">
<view class="d-s" @click="goDetails(item.identity)"> <view class="d-s" @click="goDetails(item.identity)">
@ -50,7 +50,12 @@
data() { data() {
return { return {
keyword: '', keyword: '',
cadetList: [] cadetList: [],
param:{
pageNum:1,
pageSize:10,
total:0
}
} }
}, },
onShow() { onShow() {
@ -61,30 +66,39 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onReachBottom() { onReachBottom() {
// this.show = true
setTimeout(() => { //
console.log("加载执行"); if (this.cadetList.length < this.param.total) {
}, 2000) this.param.pageNum++
this.findCadetList()
}
}, },
methods: { methods: {
async changeInput() { async changeInput() {
if (this.keyword) { this.cadetLis =[]
let res = await request({ this.findCadetList()
url: `/system/pay/stuList?name=${this.keyword}`,
method: 'get'
})
this.cadetList = res
} else {
this.findCadetList()
}
}, },
async findCadetList() { async findCadetList() {
let res = await request({ let res = await request({
url: `/system/pay/stuList`, url: `/system/pay/stuList`,
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'
})
}
}, },
gettel(tel) { gettel(tel) {
uni.makePhoneCall({ uni.makePhoneCall({

View File

@ -155,11 +155,13 @@
method: 'get', method: 'get',
params: { params: {
isSign: isSign, isSign: isSign,
state: state state: state,
pageNum:1,
pageSize:10
} }
}) })
this.orderList = res.rows this.orderList = res.data.records
}, },
// getindex(index) { // getindex(index) {