This commit is contained in:
shijingjing
2023-02-22 08:37:34 +08:00
parent f5cb84d57a
commit c363287d0d
2 changed files with 18 additions and 14 deletions

View File

@@ -7,7 +7,8 @@
<p class="all_test">全部考试</p> <p class="all_test">全部考试</p>
<div class="card_list" v-if="testList.length"> <div class="card_list" v-if="testList.length">
<scroll-view :style="{height: height + 'px'}" scroll-y @scrolltolower="scrolltLower"> <!-- @scrolltolower="scrolltLower" -->
<scroll-view :style="{height: height + 'px'}" scroll-y>
<div class="card" v-for="item in testList" :key="item.id"> <div class="card" v-for="item in testList" :key="item.id">
<div class="card_top"> <div class="card_top">
<div class="card_title">{{ item.examinationName }}</div> <div class="card_title">{{ item.examinationName }}</div>
@@ -92,12 +93,13 @@ export default {
this.$instance.post(`/app/appexaminationinfo/listForXCX`, null, { this.$instance.post(`/app/appexaminationinfo/listForXCX`, null, {
params: { params: {
current: this.current, current: this.current,
size: 10, size: 3000,
title: this.title title: this.title
} }
}).then(res=> { }).then(res=> {
if(res?.data) { if(res?.data) {
this.testList = this.current==1? res.data.records: [...this.testList,...res.data.records] // this.testList = this.current==1? res.data.records: [...this.testList,...res.data.records]
this.testList = res.data.records
} }
}) })
}, },
@@ -154,10 +156,10 @@ export default {
this.$u.toast(err.msg) this.$u.toast(err.msg)
}) })
}, },
scrolltLower() { // scrolltLower() {
this.current++ // this.current++
this.getList() // this.getList()
} // }
}, },
} }
</script> </script>

View File

@@ -7,7 +7,8 @@
<p class="all_class">全部课程</p> <p class="all_class">全部课程</p>
<div class="card_list" v-if="classList.length"> <div class="card_list" v-if="classList.length">
<scroll-view :style="{height: height + 'px'}" scroll-y @scrolltolower="scrolltLower"> <!-- @scrolltolower="scrolltLower" -->
<scroll-view :style="{height: height + 'px'}" scroll-y>
<div class="card" v-for="item in classList" :key="item.id" @click="handleToDetail(item.id)"> <div class="card" v-for="item in classList" :key="item.id" @click="handleToDetail(item.id)">
<div class="card_left"> <div class="card_left">
<img :src="item.pictureUrl" alt=""> <img :src="item.pictureUrl" alt="">
@@ -43,22 +44,23 @@ export default {
this.$instance.post(`/app/appcourseinfo/listByApplet`, null, { this.$instance.post(`/app/appcourseinfo/listByApplet`, null, {
params: { params: {
current: this.current, current: this.current,
size: 10, size: 3000,
title: this.title title: this.title
} }
}).then(res=> { }).then(res=> {
if(res?.data) { if(res?.data) {
this.classList = this.current==1? res.data.records: [...this.classList,...res.data.records] // this.classList = this.current==1? res.data.records: [...this.classList,...res.data.records]
this.classList = res.data.records
} }
}) })
}, },
handleToDetail(id) { handleToDetail(id) {
this.$emit('toDetail',id) this.$emit('toDetail',id)
}, },
scrolltLower() { // scrolltLower() {
this.current ++; // this.current ++;
this.getList() // this.getList()
} // }
}, },
onReachBottom() { onReachBottom() {