首页公告优化
This commit is contained in:
@@ -439,14 +439,17 @@
|
||||
this.ruleInit()
|
||||
return
|
||||
}
|
||||
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()
|
||||
}
|
||||
});
|
||||
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()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.page < this.pages) {
|
||||
@@ -486,6 +489,8 @@
|
||||
this.ruleIndex++
|
||||
if( this.ruleIndex >= this.ruleList.length) {
|
||||
this.ruleIndex = 0
|
||||
uni.setStorageSync('ruleShow', true)
|
||||
|
||||
return
|
||||
}
|
||||
this.ruleShow = false
|
||||
|
||||
Reference in New Issue
Block a user