From d42ed54b034a3544fb86cd0bb33d27b297e57d50 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Wed, 15 Jan 2025 09:36:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=85=AC=E5=91=8A=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index2.vue | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/pages/index/index2.vue b/pages/index/index2.vue index dbe4afd..e79163c 100644 --- a/pages/index/index2.vue +++ b/pages/index/index2.vue @@ -108,22 +108,20 @@ } }); - httpsRequest.getT("/app/announcement", { - type: 0 - }).then(res => { - if (res.code == 0 && res.data.length > 0) { - this.ruleShow = true - this.ruleList = res.data - $cache_rule.set('ruleIndex', this.ruleList) - this.ruleInit() - - - // this.ruleShow = true - // this.rule_title = res.data[0].title - // this.rule_content = res.data[0].content - } - - }); + if(!uni.getStorageSync('ruleShow')){ + httpsRequest.getT("/app/announcement", { + type: 0 + }).then(res => { + if (res.code == 0 && res.data.length > 0) { + this.ruleShow = true + this.ruleList = res.data + $cache_rule.set('ruleIndex', this.ruleList) + this.ruleInit() + } + + }); + } + }, onPullDownRefresh(){ this.getrecomVideo() @@ -144,6 +142,7 @@ this.ruleIndex++ if (this.ruleIndex >= this.ruleList.length) { this.ruleIndex = 0 + uni.setStorageSync('ruleShow', true) return } this.ruleShow = false