修复首页缓存下滑加载问题
This commit is contained in:
@@ -833,9 +833,10 @@
|
|||||||
// #ifdef MP-TOUTIAO
|
// #ifdef MP-TOUTIAO
|
||||||
data.dyShow = 1
|
data.dyShow = 1
|
||||||
// #endif
|
// #endif
|
||||||
|
console.log(this.page);
|
||||||
if ($cache_index.courseList && this.page == 1) {
|
if ($cache_index.courseList && this.page == 1) {
|
||||||
this.courseList = $cache_index.courseList
|
this.courseList = $cache_index.courseList
|
||||||
|
this.pages = $cache_index.pages
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -843,6 +844,7 @@
|
|||||||
this.$Request.getT('/app/course/selectCourse', data).then(res => {
|
this.$Request.getT('/app/course/selectCourse', data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.pages = res.data.totalPage
|
this.pages = res.data.totalPage
|
||||||
|
$cache_index.set('pages', this.pages)
|
||||||
if (this.page < this.pages) {
|
if (this.page < this.pages) {
|
||||||
this.status = 'loadmore'
|
this.status = 'loadmore'
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user