From 76bee6568b3c23f9ffbc7d776a15a168ecf0e016 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Tue, 30 Dec 2025 18:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=BC=80=E5=90=AF=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=8F=90=E7=A4=BA=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index adb9463..9b0c15d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -42,7 +42,7 @@ {{ item.name }} 营业时间:{{ item.start_time }}-{{ item.end_time }} - 立即支付 + {{ item.type_id == 1 ? '立即预约' : '立即支付' }} @@ -110,14 +110,10 @@ - + 温馨提示 - - 尊敬的客户,感谢您的关注。为提 - 供更全面优质的服务,我们正在对手 - 机端相关功能进行最后的优化与升 - 级。该精彩板块即将与您见面,敬请 - 期待! + + {{ tipsContent }} 我知道了 @@ -193,6 +189,7 @@ export default { }, noticePopup: false, tipsPopup: false, + tipsContent: '', venueList: [], // 场馆列表 notice: '', company: {}, @@ -241,6 +238,7 @@ export default { } }, onShow() { + console.log(this.setting); this.getTabBarLinks(); }, onTabItemTap() { @@ -294,6 +292,26 @@ export default { function(res) { if (res.code) { self.setting = res.data.lists; + self.tipsContent = self.setting.pop; // 设置提示弹窗内容 + // 弹窗逻辑 + if (self.setting.pop_status == 'false') { + console.log('关闭弹窗'); + uni.removeStorageSync('tipsPopup'); + self.tipsPopup = false; + } else { + // 判断缓存时间 + const tipsPopupTime = uni.getStorageSync('tipsPopup'); + const now = Date.now(); + const oneDay = 24 * 60 * 60 * 1000; + if (!tipsPopupTime || now - tipsPopupTime >= oneDay) { + // 超时或首次弹窗,显示弹窗并重置时间 + self.tipsPopup = true; + uni.setStorageSync('tipsPopup', now); + } else { + // 未超时,不显示弹窗 + self.tipsPopup = false; + } + } res.data.lists.carousel.map(items => { console.log("🚀 ~ items:", items) self.bannerData.data.push({imgUrl: items.file_path, height: '400px'})