Files
PetCommunity/miniprogram/pages/notifications/notifications.wxml

31 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<view class="page">
<!-- 固定液态玻璃顶栏:返回 + 标题 + 全部已读(右侧避让胶囊按钮) -->
<view class="glass-topbar">
<view style="height: {{statusBarHeight}}px;"></view>
<view class="navbar" style="height: {{navbarHeight}}px; padding-right: {{navbarPaddingRight}}px;">
<view class="nav-back" bindtap="onBack"></view>
<view class="navbar-title">消息通知</view>
<view class="nav-right" bindtap="onReadAll">全部已读</view>
</view>
</view>
<!-- 顶栏占位 -->
<view style="height: {{statusBarHeight + navbarHeight}}px;"></view>
<scroll-view scroll-y="true" enhanced="true" show-scrollbar="false">
<view wx:if="{{list.length === 0}}" class="empty">
<text class="empty-emoji">🔔</text>
<text class="empty-tip">暂时没有新消息</text>
</view>
<view wx:for="{{list}}" wx:key="_id" class="notify-item {{item.isRead ? '' : 'unread'}}" bindtap="onItemTap" data-item="{{item}}">
<view class="n-avatar" style="background: {{item.gradient}}">{{item.fromNick[0]}}</view>
<view class="n-body">
<text class="n-text">{{item.fromNick}} {{item.action}}了你的{{item.target}}</text>
<text class="n-time">{{item.timeText}}</text>
</view>
<view wx:if="{{!item.isRead}}" class="unread-dot"></view>
</view>
<view style="height: 60rpx;"></view>
</scroll-view>
</view>