修复首页缓存下滑加载问题

This commit is contained in:
2024-12-31 16:25:03 +08:00
parent cfe567a206
commit 3698ff6379

View File

@@ -833,9 +833,10 @@
// #ifdef MP-TOUTIAO
data.dyShow = 1
// #endif
console.log(this.page);
if ($cache_index.courseList && this.page == 1) {
this.courseList = $cache_index.courseList
this.pages = $cache_index.pages
uni.stopPullDownRefresh()
return
}
@@ -843,6 +844,7 @@
this.$Request.getT('/app/course/selectCourse', data).then(res => {
if (res.code == 0) {
this.pages = res.data.totalPage
$cache_index.set('pages', this.pages)
if (this.page < this.pages) {
this.status = 'loadmore'
} else {