1 Commits

Author SHA1 Message Date
GaoHao
d42ed54b03 首页公告优化 2025-01-15 09:36:54 +08:00

View File

@@ -108,22 +108,20 @@
} }
}); });
httpsRequest.getT("/app/announcement", { if(!uni.getStorageSync('ruleShow')){
type: 0 httpsRequest.getT("/app/announcement", {
}).then(res => { type: 0
if (res.code == 0 && res.data.length > 0) { }).then(res => {
this.ruleShow = true if (res.code == 0 && res.data.length > 0) {
this.ruleList = res.data this.ruleShow = true
$cache_rule.set('ruleIndex', this.ruleList) this.ruleList = res.data
this.ruleInit() $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 }
}
});
}, },
onPullDownRefresh(){ onPullDownRefresh(){
this.getrecomVideo() this.getrecomVideo()
@@ -144,6 +142,7 @@
this.ruleIndex++ this.ruleIndex++
if (this.ruleIndex >= this.ruleList.length) { if (this.ruleIndex >= this.ruleList.length) {
this.ruleIndex = 0 this.ruleIndex = 0
uni.setStorageSync('ruleShow', true)
return return
} }
this.ruleShow = false this.ruleShow = false