From 83be0201826bd36f7fc8955863b251a3e6689cb6 Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Sat, 21 Sep 2024 11:23:51 +0800 Subject: [PATCH] =?UTF-8?q?Fix:2398=20=E3=80=90=E5=95=86=E5=9F=8E=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E3=80=91=E5=AF=BB=E8=B6=A3=E5=91=B3--?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=9F=8E=E5=B8=82=E5=90=8E=E5=BE=88=E5=A4=A7?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E5=88=B7=E6=96=B0=E5=90=8E=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/cloud/haveFun.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pages/cloud/haveFun.vue b/pages/cloud/haveFun.vue index 9c35aee..c24f83e 100644 --- a/pages/cloud/haveFun.vue +++ b/pages/cloud/haveFun.vue @@ -137,7 +137,8 @@ export default { cityName: '', hotelList: [], isLoad: false, - pageKeyId: Object.freeze('findFunIndex') + pageKeyId: Object.freeze('findFunIndex'), + isNext: false } }, computed: { @@ -152,8 +153,10 @@ export default { }, onReachBottom() { // 后端接口结构需要调整下,需要补充总页数,前端可判断当前页数大于等于总页数则不发送网络请求 - this.page++ - this.fetchList() + if(this.isNext) { + this.page++ + this.fetchList() + } }, onLoad() { @@ -173,7 +176,6 @@ export default { this.cityName = memCityName uni.removeStorageSync('cityName') this.name = '' - this.search() } }, methods: { @@ -235,6 +237,11 @@ export default { data[i].videoCover = '' } this.hotelList.push(data[i]) + if(data.length < 10) { + this.isNext = false + } else { + this.isNext = true + } } } }).finally(() => {