Files
mzltMpfqGS e4a087e67e init
2026-04-15 19:45:16 +08:00

53 lines
2.0 KiB
Plaintext
Raw Permalink 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.

<!-- pages/notification/notification.wxml -->
<!-- 消息通知视图 -->
<view class="notification-container">
<!-- 工具栏 -->
<view class="toolbar" wx:if="{{notificationList.length > 0}}">
<text class="toolbar-btn" bindtap="onMarkAllRead">全部标为已读</text>
</view>
<!-- 通知列表 -->
<view class="notification-list">
<view
class="notification-item {{item.isRead ? 'read' : 'unread'}}"
wx:for="{{notificationList}}"
wx:key="id"
bindtap="onNotificationTap"
data-notification="{{item}}"
>
<view class="notification-icon">
<text class="iconfont {{item.type === 'system' ? 'icon-settings' : item.type === 'comment' ? 'icon-comment' : 'icon-bell'}}"></text>
</view>
<view class="notification-content">
<view class="notification-header">
<text class="notification-title">{{item.title}}</text>
<text class="notification-time">{{item.createTime}}</text>
</view>
<text class="notification-text">{{item.content}}</text>
</view>
<view class="notification-actions">
<text class="action-btn" bindtap="onMarkRead" data-id="{{item.id}}">已读</text>
<text class="action-btn delete" bindtap="onDelete" data-id="{{item.id}}">删除</text>
</view>
</view>
</view>
<view class="loading-more" wx:if="{{loading}}">
<text>加载中...</text>
</view>
<view class="no-more" wx:if="{{!hasMore && notificationList.length > 0}}">
<text>没有更多了</text>
</view>
<view class="empty-state" wx:if="{{!loading && notificationList.length === 0}}">
<text class="iconfont icon-bell empty-icon"></text>
<text class="empty-text">暂无通知</text>
</view>
</view>
/**
* @联系作者16768118056
* @描述:(此项目非免费分享)源码百分百可用,搞定毕设不发愁,支持远程调试安装、二次开发、定制、讲解、文档类。
* @访问https://www.notmaker.com/detail/8326a897119d4542896c863a69d7bbe7/gtt20260415查看完整运行演示。
*/