From 4d85ad96062e9f5730c74ac0ead6787d742e628f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Wed, 9 Jul 2025 11:38:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=B9=BF=E5=91=8A=E7=9A=84=E8=8E=B7=E5=8F=96=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/community/index/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/community/index/index.vue b/packages/community/index/index.vue index b0ee4067..52487768 100644 --- a/packages/community/index/index.vue +++ b/packages/community/index/index.vue @@ -90,7 +90,8 @@
- + @@ -148,7 +149,9 @@ categoryList: [], infoList: [], - selectedTab: 0 + selectedTab: 0, + + currentAdIndex: 0 } }, async onLoad(options) { @@ -351,6 +354,9 @@ // #endif } }, + onSwiperChange(e) { + this.currentAdIndex = e.detail.current; + }, onDetailClick() { // 获取当前显示的广告项 const currentAd = this.popList[this.currentAdIndex]; From 19d05689090d1ce0d139b73b2d2384b0b53adfc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Wed, 9 Jul 2025 11:52:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=B9=BF=E5=91=8Abug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/community/index/index.vue | 32 +++++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/packages/community/index/index.vue b/packages/community/index/index.vue index 52487768..9fd78a90 100644 --- a/packages/community/index/index.vue +++ b/packages/community/index/index.vue @@ -277,12 +277,16 @@ page_num: 1, page_size: 50 }) - this.largePopList = res4.rows.map(item => { - return { - ...item, - ad_picture: picUrl + item.ad_picture - }; - }); + if (res4.rows.length != 0) { + this.largePopList = res4.rows.map(item => { + return { + ...item, + ad_picture: picUrl + item.ad_picture + }; + }); + } else { + this.ads1Show = false + } const res5 = await request(apiArr.advPage, "POST", { community_id: Number(uni.getStorageSync('changeCommData').id), @@ -290,12 +294,16 @@ page_num: 1, page_size: 50 }) - this.popList = res5.rows.map(item => { - return { - ...item, - ad_picture: picUrl + item.ad_picture - }; - }); + if (res5.rows.length != 0) { + this.popList = res5.rows.map(item => { + return { + ...item, + ad_picture: picUrl + item.ad_picture + }; + }); + } else { + this.ads2Show = false + } }, headerServerClick(e) {