公告优化更新

This commit is contained in:
GaoHao
2025-01-09 17:21:54 +08:00
parent f53512d2a3
commit 92e53ae8b2
4 changed files with 19 additions and 12 deletions

View File

@@ -131,7 +131,7 @@
export default {
data() {
return {
ruleShow: true,
ruleShow: false,
rule_title: "",
rule_content: "",
money: '',
@@ -186,10 +186,11 @@
return
}
this.$Request.getT("app/announcement", {type: 1}).then(res => {
if (res.code == 0) {
if (res.code == 0 && res.data.length > 0) {
this.ruleList = res.data
$cache_config.set('ruleCash',this.ruleList)
this.ruleInit()
this.ruleShow = true
}
});
},
@@ -247,7 +248,13 @@
* 规则弹窗打开
*/
showRule(){
console.log(this.ruleIndex)
if( this.ruleList.length <= 0) {
uni.showToast({
title: "暂未配置规则",
icon: 'none'
})
return
}
this.ruleInit()
this.ruleShow = true
},