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>
<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_top">
<div class="card_title">{{ item.examinationName }}</div>
@@ -92,12 +93,13 @@ export default {
this.$instance.post(`/app/appexaminationinfo/listForXCX`, null, {
params: {
current: this.current,
size: 10,
size: 3000,
title: this.title
}
}).then(res=> {
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)
})
},
scrolltLower() {
this.current++
this.getList()
}
// scrolltLower() {
// this.current++
// this.getList()
// }
},
}
</script>

View File

@@ -7,7 +7,8 @@
<p class="all_class">全部课程</p>
<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_left">
<img :src="item.pictureUrl" alt="">
@@ -43,22 +44,23 @@ export default {
this.$instance.post(`/app/appcourseinfo/listByApplet`, null, {
params: {
current: this.current,
size: 10,
size: 3000,
title: this.title
}
}).then(res=> {
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) {
this.$emit('toDetail',id)
},
scrolltLower() {
this.current ++;
this.getList()
}
// scrolltLower() {
// this.current ++;
// this.getList()
// }
},
onReachBottom() {