效果图:
![](https://i-blog.csdnimg.cn/direct/c980f93a41f74508a887da0ebb851d65.gif)
核心代码:
<script lang="ts" setup>
import { ref, reactive } from 'vue';
import api from '@/request/api.js'
import empty from '@/component/empty.vue'
import { onLoad,onShow, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
let form = ref({
type:2,
pageNo: 1,
pageSize: 10
})
let listData = ref([]);
let total = ref(0);
let status = ref('loadmore');
const requestGetListData = () => {
api.getFlawOrCheckList(form.value).then(res => {
console.log("requestGetCourse", res)
listData.value = [...listData.value, ...res.result.records]
total.value = res.result.total
if (form.value.pageNo >= total.value / form.value.pageS