公告更新

This commit is contained in:
GaoHao
2025-01-09 16:47:09 +08:00
parent bc88a048aa
commit 91c5592191
4 changed files with 93 additions and 53 deletions

View File

@@ -197,7 +197,7 @@
style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/index_guide.png') no-repeat center bottom / 100%;background-color: rgba(0, 0, 0, 0.8);">
</div>
<!-- #endif -->
<u-modal v-model="ruleShow" confirm-text="知道了" :title="rule_title" :title-style="{fontWeight:'700'}" confirm-color="rgb(255, 117, 129)">
<u-modal v-model="ruleShow" confirm-text="知道了" @confirm="ruleConfirm" :title="rule_title" :title-style="{fontWeight:'700'}" confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;" >
<rich-text class="color-666" :nodes="rule_content"></rich-text>
@@ -280,6 +280,8 @@
ruleShow: false,
rule_title: '',
rule_content: '',
ruleIndex: 0,
ruleList: []
};
},
onShareAppMessage(res) {
@@ -432,13 +434,11 @@
},
onReady() {
httpsRequest.getT("app/announcement", {}).then(res => {
httpsRequest.getT("app/announcement", {type: 0}).then(res => {
if (res.code == 0) {
if (res.data && res.data.state == 1) {
this.ruleShow = true
this.rule_title = res.data.title
this.rule_content = res.data.content
}
this.ruleShow = true
this.ruleList = res.data
this.ruleInit()
}
});
},
@@ -471,6 +471,23 @@
this.getCourseList()
},
methods: {
ruleInit(){
this.rule_title = this.ruleList[this.ruleIndex].title
this.rule_content = this.ruleList[this.ruleIndex].content
},
ruleConfirm(){
this.ruleIndex++
if( this.ruleIndex >= this.ruleList.length) {
this.ruleIndex = 0
return
}
this.ruleShow = false
setTimeout(res=>{
this.ruleInit()
this.ruleShow = true
},300)
},
//新用户红包 837
newUserRedInit(){
if($cache_config.isNewUserRedPack!==null&&$cache_config.isNewUserRedPack!==undefined){