feat: 重构公告及消息,公告支持系统消息推送提醒、定时发布、置顶、记录读取状态

This commit is contained in:
2025-05-20 22:37:06 +08:00
parent feef35f541
commit abf3f13041
19 changed files with 316 additions and 151 deletions

View File

@@ -3,7 +3,7 @@
<a-list :loading="loading">
<template #header>通知</template>
<a-list-item v-for="item in messageList" :key="item.id">
<div class="content-wrapper" @click="open">
<div class="content-wrapper" @click="open(item.path)">
<div class="content">{{ item.title }}</div>
<div class="date">{{ item.createTime }}</div>
</div>
@@ -48,7 +48,11 @@ const getMessageData = async () => {
}
// 打开消息中心
const open = () => {
const open = (path?: string) => {
if (path) {
router.push(path)
return
}
router.push({ path: '/user/message', query: { tab: 'msg' } })
}