From 9ddb0b53f3670f0ff948a136bfca004e900f366e Mon Sep 17 00:00:00 2001 From: LinCyJang Date: Tue, 29 Jul 2025 23:38:37 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A4032=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E6=9F=A5=E7=9C=8B=E8=B5=84?= =?UTF-8?q?=E8=AE=AF=E5=9B=BE=E7=89=87=E4=BC=9A=E5=88=B7=E6=96=B0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=88=B0=E5=BA=97=E9=93=BA=E9=A1=B6=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesInn/inn/innHome.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pagesInn/inn/innHome.vue b/pagesInn/inn/innHome.vue index 4d6776e..4fc75f6 100644 --- a/pagesInn/inn/innHome.vue +++ b/pagesInn/inn/innHome.vue @@ -587,7 +587,8 @@ export default { isLoadInfoListSuccess: false, pageKeyId: '', shareImg: '', - videoPlayers: [] + videoPlayers: [], + isView: false } }, // 必须在页面加 onPageScroll(e){} ,才能滑动显示背景 @@ -669,16 +670,21 @@ export default { } }, onShow() { + console.log(this.infoArray); + if (!this.isLoad) { return } + this.fetchInnDetail() + if(this.isView) return if(this.activeIndex === 1) { this.fetchInnInfoList() + return } if (uni.getStorageSync('hotelInfoPublish') === '1') { this.fetchInnInfoList() + return } - this.fetchInnDetail() }, watch: { activeIndex: { @@ -854,6 +860,7 @@ export default { } uni.$u.debounce(() => { hotelNewsView({ id: item.id }).finally(() => { + this.isView = true this.infoArray.map(info => { if (info.id === item.id) { info.pv += 1 @@ -1002,6 +1009,7 @@ export default { _this.isLoad = true } }).finally(() => { + this.isView = false uni.stopPullDownRefresh() }) },