1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-09-12 16:40:40 +08:00

refactor: 重构维护模式相关逻辑,拆分维护说明与详情

- 拆分维护接口类型,新增notice和description字段区分纯文本说明与富文本详情
- 重构useMaintenanceIntercept钩子,统一维护拦截逻辑
- 新增维护详情弹窗组件,优化维护页UI与交互
- 修复按钮布局、滚动置顶黑名单等细节问题
- 优化公告弹窗组件样式与代码结构
This commit is contained in:
小莫唐尼
2026-09-04 16:05:09 +08:00
parent 570c394501
commit 629b1f9219
14 changed files with 676 additions and 1035 deletions
+10 -8
View File
@@ -6,6 +6,7 @@
import { useSettingStore } from '@/store/setting'
import { checkAvatarUrl, checkImageUrl } from '@/utils/url'
import { t } from '@/locale'
import { useMaintenanceIntercept } from '@/hooks/useMaintenanceIntercept'
import type { IPost } from '@/api/types/halo'
definePage({
@@ -146,12 +147,20 @@
},
})
}
function init(){
if (!intercepted.value) {
handleQuery()
}
}
init()
/* ---------------- 生命周期 ---------------- */
// 维护检查
onShow(async () => {
intercepted.value = await interceptOrContinue()
console.log('拦截状态', intercepted.value)
})
onPullDownRefresh(() => {
@@ -175,13 +184,6 @@
}
})
// 首次加载
onMounted(() => {
if (intercepted.value) {
return
}
handleQuery()
})
</script>
<template>