feat: Notifications

This commit is contained in:
zzc
2026-06-15 07:18:36 +08:00
parent 179abe01b0
commit 9a28a0929d

View File

@@ -10,13 +10,6 @@
<view v-if="unreadCount > 0" class="unread-chip">
<text class="unread-chip-text">{{ unreadCount }} 未读</text>
</view>
<view
class="read-all-btn"
:class="{ disabled: readingAll || unreadCount === 0 }"
@tap="handleMarkAllRead"
>
<text class="read-all-text">{{ readingAll ? "处理中" : "全部已读" }}</text>
</view>
</view>
</view>
</view>
@@ -24,25 +17,6 @@
<view :style="{ height: statusBarHeight + 64 + 'px' }"></view>
<view class="page-body">
<view class="hero-card">
<view class="hero-stats">
<view class="hero-stat">
<text class="hero-stat-num">{{ totalCount }}</text>
<text class="hero-stat-label">全部消息</text>
</view>
<view class="hero-divider"></view>
<view class="hero-stat">
<text class="hero-stat-num accent">{{ unreadCount }}</text>
<text class="hero-stat-label">未读提醒</text>
</view>
<view class="hero-divider"></view>
<view class="hero-stat">
<text class="hero-stat-num">{{ todayCount }}</text>
<text class="hero-stat-label">今日新增</text>
</view>
</view>
</view>
<view v-if="!isLoggedIn" class="state-card login-card">
<text class="state-title">登录后查看你的系统消息</text>
<text class="state-desc">审核结果评论互动点赞提醒都会同步到这里</text>
@@ -62,7 +36,13 @@
<text class="filter-tab-text">{{ tab.label }}</text>
</view>
</view>
<text class="filter-hint">{{ activeFilter === "unread" ? "只看未读" : "全部消息" }}</text>
<view
class="read-all-btn filter-read-all-btn"
:class="{ disabled: readingAll || unreadCount === 0 }"
@tap="handleMarkAllRead"
>
<text class="read-all-text">{{ readingAll ? "处理中" : "全部已读" }}</text>
</view>
</view>
<view v-if="loading && !notificationList.length" class="state-card">
@@ -563,6 +543,11 @@ onReachBottom(() => {
background: #111111;
}
.filter-read-all-btn {
flex-shrink: 0;
padding: 10rpx 22rpx;
}
.read-all-btn.disabled {
opacity: 0.45;
}