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>
<view class="content">
<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 class="g_">
{{cadetList.total}}
{{param.total}}
</view>
<u-empty mode="list" v-if="cadetList.total == 0">
</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;
justify-content: space-between;width: 100%;">
<view class="d-s" @click="goDetails(item.identity)">
@ -50,7 +50,12 @@
data() {
return {
keyword: '',
cadetList: []
cadetList: [],
param:{
pageNum:1,
pageSize:10,
total:0
}
}
},
onShow() {
@ -61,30 +66,39 @@
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
//
if (this.cadetList.length < this.param.total) {
this.param.pageNum++
this.findCadetList()
}
},
methods: {
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.cadetLis =[]
this.findCadetList()
},
async findCadetList() {
let res = await request({
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) {
uni.makePhoneCall({

View File

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