重庆bug修改

This commit is contained in:
FrancisHu 2024-08-08 10:02:14 +08:00
parent f65bcec13d
commit b1a77db6b9
2 changed files with 34 additions and 22 deletions

View File

@ -256,6 +256,9 @@ import { basePath } from '../../public'
export default { export default {
data() { data() {
return { return {
pageNum: 1,
pageSize: 10,
pageTotal: 0,
showLoading: false, showLoading: false,
allChecked: false, allChecked: false,
examFormData: { examFormData: {
@ -592,18 +595,21 @@ import { basePath } from '../../public'
let that = this let that = this
that.showLoading = true that.showLoading = true
that.$api.fetchExam.fetchTrueExamListCq({ that.$api.fetchExam.fetchTrueExamListCq({
souceBy: 1 souceBy: 0,
pageNum: that.pageNum,
pageSize: that.pageSize
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.length == 0) { that.pageTotal = res.data.data.total
if (res.data.data.rows.length == 0) {
that.showLoading = false that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '未查询到相关数据!' title: '未查询到相关数据!'
}) })
} else { } else {
that.fetchMaterialList = res.data.data.rows that.fetchMaterialList = [...that.fetchMaterialList, ...res.data.data.rows]
that.showLoading = false that.showLoading = false
console.log(that.fetchMaterialList); console.log(that.fetchMaterialList);
} }
@ -644,7 +650,13 @@ import { basePath } from '../../public'
} }
if (that.roles.includes('admin')) that.roles = ['admin', 'fgs', 'sgb', 'ajb', 'jjfgs', 'tsfgs'] if (that.roles.includes('admin')) that.roles = ['admin', 'fgs', 'sgb', 'ajb', 'jjfgs', 'tsfgs']
that.initFetch() that.initFetch()
} },
onReachBottom() {
console.log(this.fetchMaterialList, this.pageTotal);
if (this.fetchMaterialList.length >= this.pageTotal) return;
this.pageNum++
this.initFetch()
},
} }
</script> </script>

File diff suppressed because one or more lines are too long