Files
PetCommunity/miniprogram/pages/notifications/notifications.wxml
2026-06-05 17:46:51 +08:00

24 lines
1.1 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="safe-top" style="height: {{statusBarHeight}}px"></view>
<view class="nav">
<view class="nav-back" bindtap="onBack"></view>
<view class="nav-title">消息通知</view>
<view class="nav-right" bindtap="onReadAll">全部已读</view>
</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>