首页公告优化

This commit is contained in:
GaoHao 2025-01-15 09:23:53 +08:00
parent b674358871
commit b9100b58bb
1 changed files with 13 additions and 7 deletions

View File

@ -68,7 +68,8 @@
<script setup> <script setup>
import { import {
reactive reactive,
nextTick
} from 'vue'; } from 'vue';
import { import {
announcement, announcement,
@ -121,15 +122,19 @@
versionUpdate() versionUpdate()
getMsg() getMsg()
getrecomVideo() getrecomVideo()
datas.isExamine = $common.isExamine || 0
}) })
onReady(() => { onReady(() => {
announcement({ if(!uni.getStorageSync('ruleShow')){
type: 0
}).then(res => {
datas.ruleList = res
ruleInit()
datas.ruleShow = true datas.ruleShow = true
}) announcement({
type: 0
}).then(res => {
datas.ruleList = res
ruleInit()
})
}
}) })
onReachBottom(() => { onReachBottom(() => {
++datas.page ++datas.page
@ -226,6 +231,7 @@
datas.ruleIndex++ datas.ruleIndex++
if (datas.ruleIndex >= datas.ruleList.length) { if (datas.ruleIndex >= datas.ruleList.length) {
datas.ruleIndex = 0 datas.ruleIndex = 0
uni.setStorageSync('ruleShow', true)
return return
} }
setTimeout(res => { setTimeout(res => {