From d9d45817aa2516416f3ac7717aaabfa7be63c533 Mon Sep 17 00:00:00 2001
From: zhangkai <847704969@qq.com>
Date: Thu, 19 Jun 2025 14:18:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E7=B1=BB=E5=92=8C?=
=?UTF-8?q?=E9=A6=96=E9=A1=B5=20=E5=8A=A0=E8=BD=BD=E4=B8=AD=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/fenl/index.vue | 12 +++++++++---
pages/index/index.vue | 13 ++++++++-----
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/pages/fenl/index.vue b/pages/fenl/index.vue
index 5cb2a04..f6a08af 100644
--- a/pages/fenl/index.vue
+++ b/pages/fenl/index.vue
@@ -18,7 +18,7 @@
{{ tab.name }}
@@ -26,7 +26,7 @@
-
+
@@ -107,7 +107,7 @@
-
+
@@ -199,6 +199,12 @@
}, 2000)
},
methods: {
+ onScrolltolower(){
+ if (this.hotList.length < this.count) {
+ this.page+=1;
+ this.getHotList();
+ }
+ },
onheight() {
uni.getSystemInfo({
success: res => {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 9179161..d5fac91 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -349,8 +349,10 @@ export default {
},
methods: {
onScrolltolower(){
- this.page+=1;
- this.getHotList();
+ if (this.hotList.length < this.count) {
+ this.page+=1;
+ this.getHotList();
+ }
},
onS(){
this.homrS=true;
@@ -719,13 +721,13 @@ export default {
}
}).then(res => {
if (res.code == 1) {
- this.count = res.data.list.total
+ this.count = res.data.list.total;
+ this.hotList = [...this.hotList, ...res.data.list.data];
if (this.hotList.length >= res.data.list.total) {
this.loadStatus = 'nomore';
} else {
this.loadStatus = 'loading';
}
- this.hotList = [...this.hotList, ...res.data.list.data];
} else {
uni.showToast({
title: res.msg,
@@ -755,12 +757,13 @@ export default {
.then((res) => {
if (res.code == 1) {
this.count = res.data.count;
+ this.hotList = [...this.hotList, ...res.data.list.data];
if (this.hotList.length >= res.data.count) {
this.loadStatus = 'nomore';
} else {
this.loadStatus = 'loading';
}
- this.hotList = [...this.hotList, ...res.data.list.data];
+
} else {
uni.showToast({
title: res.msg,