From 80f31109ec1b3f7f56274376684ecbf99151953c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Mon, 8 Sep 2025 10:46:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B2=A1=E6=9C=89=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E4=BB=BB=E4=BD=95=E6=88=BF=E6=BA=90=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=B7=E5=BC=8F=20=E4=BF=AE=E6=94=B9=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E5=B9=BF=E5=91=8A=E5=8F=AA=E5=87=BA=E7=8E=B0=E4=B8=80?= =?UTF-8?q?=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/community/index/index.vue | 58 +++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/packages/community/index/index.vue b/packages/community/index/index.vue index 3ce9d801..f9b906c6 100644 --- a/packages/community/index/index.vue +++ b/packages/community/index/index.vue @@ -36,8 +36,8 @@ - - + + {{ item.nav_name }} @@ -216,6 +216,48 @@ export default { visible_communities: "" } ], + noValFunctionList: [ + { + nav_icon: 'http://localhost:8080/noValFunction1.png', + nav_name: "物业介绍", + }, + { + nav_icon: 'http://localhost:8080/noValFunction2.png', + nav_name: "物业缴费", + }, + { + nav_icon: 'http://localhost:8080/noValFunction3.png', + nav_name: "物业公积金", + }, + { + nav_icon: 'http://localhost:8080/noValFunction1.png', + nav_name: "物业保修", + }, + { + nav_icon: 'http://localhost:8080/noValFunction4.png', + nav_name: "便民电话", + }, + { + nav_icon: 'http://localhost:8080/noValFunction5.png', + nav_name: "人脸门禁", + }, + { + nav_icon: 'http://localhost:8080/noValFunction6.png', + nav_name: "手机开门", + }, + { + nav_icon: 'http://localhost:8080/noValFunction7.png', + nav_name: "物业活动", + }, + { + nav_icon: 'http://localhost:8080/noValFunction8.png', + nav_name: "访客邀请", + }, + { + nav_icon: 'http://localhost:8080/noValFunction10.png', + nav_name: "场地预约", + }, + ], ads1Show: false, ads2Show: false, @@ -340,9 +382,13 @@ export default { }, closeAds() { this.ads1Show = false; + // 记录用户已关闭过弹窗1 + uni.setStorageSync('ads1Showed', true); }, closeAds2() { this.ads2Show = false; + // 记录用户已关闭过弹窗2 + uni.setStorageSync('ads2Showed', true); }, jump(e) { if (!e) { @@ -474,7 +520,9 @@ export default { ad_picture: picUrl + item.ad_picture, }; }); - this.ads1Show = res4.rows.length !== 0 ? true : false; + // 检查用户是否已关闭过弹窗1,只有当没有关闭过且有广告数据时才显示 + const ads1Showed = uni.getStorageSync('ads1Showed'); + this.ads1Show = !ads1Showed && res4.rows.length !== 0 ? true : false; const res5 = await request(apiArr.advPage, "POST", { community_id: Number(uni.getStorageSync("changeCommData").id), @@ -488,7 +536,9 @@ export default { ad_picture: picUrl + item.ad_picture, }; }); - this.ads2Show = res5.rows.length !== 0 ? true : false; + // 检查用户是否已关闭过弹窗2,只有当没有关闭过且有广告数据时才显示 + const ads2Showed = uni.getStorageSync('ads2Showed'); + this.ads2Show = !ads2Showed && res5.rows.length !== 0 ? true : false; }, headerServerClick(e) {