增加站内信未读提醒和后台通知中心+txt 校验

This commit is contained in:
yml2213
2026-06-19 15:24:15 +08:00
parent 8d5094a8d0
commit a4cdc3e806
30 changed files with 1836 additions and 53 deletions
@@ -5,6 +5,7 @@ import { useRouter, useRoute } from 'vue-router'
import { useSessionStore } from '@/stores/session'
import { showDialog, showToast } from 'vant'
import MobileBottomNav from '@/components/MobileBottomNav.vue'
import { useNotificationUnreadCount } from '@/features/auth/composables/useNotificationUnreadCount'
import {
fetchWalletBalance,
@@ -19,6 +20,8 @@ import { formatCent } from '@/shared/utils/money'
const session = useSessionStore()
const router = useRouter()
const route = useRoute()
const { unreadCount: notificationUnreadCount, unreadLabel: notificationUnreadLabel } =
useNotificationUnreadCount(route)
/** 数据项 */
const availableBalanceCent = ref(0)
@@ -375,6 +378,13 @@ function resolveAvatarURL(url: string | undefined | null) {
<div class="menu-card cell-card">
<van-cell-group :border="false">
<van-cell title="消息中心" icon="chat-o" is-link to="/m/messages" />
<van-cell title="站内信" icon="bell" is-link to="/m/notifications">
<template #value>
<span v-if="notificationUnreadCount > 0" class="unread-cell-value">
{{ notificationUnreadLabel }} 未读
</span>
</template>
</van-cell>
<van-cell title="公告中心" icon="volume-o" is-link to="/m/announcements" />
<van-cell title="资料修改" icon="edit" is-link @click="openProfileEditor" />
<van-cell title="实名认证" icon="idcard" is-link to="/m/realname">
@@ -874,6 +884,10 @@ function resolveAvatarURL(url: string | undefined | null) {
.unverified-color {
color: #9ca3af;
}
.unread-cell-value {
color: #ef4444;
font-weight: 700;
}
/* 收支明细 Popup */
.ledgers-popup {