| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <template>
- <view class="container">
- <!-- 自定义导航栏 -->
- <view class="nav-bar">
- <view class="nav-left" @click="navBack">
- <image class="back-icon" src="/static/icons/chevron_right_dark.svg" style="transform: rotate(180deg);"></image>
- </view>
- <text class="nav-title">消息中心</text>
- <view class="nav-right">
- <view class="more-dots">
- <view class="dot"></view>
- <view class="dot"></view>
- <view class="dot"></view>
- </view>
- </view>
- </view>
- <view class="nav-placeholder"></view>
- <!-- 消息分类列表 -->
- <view class="message-list">
- <!-- 订单消息 -->
- <view class="message-item" @click="navToOrderMsg">
- <view class="icon-wrapper">
- <image class="msg-icon" src="/static/icons/icon_order_msg.svg"></image>
- <view class="red-dot-badge"></view>
- </view>
- <view class="content-wrapper">
- <view class="top-row">
- <text class="msg-title">订单消息</text>
- <text class="msg-time">5分钟前</text>
- </view>
- <text class="msg-preview">你收到一个站长手动派单的新订单</text>
- </view>
- </view>
- <!-- 系统消息 -->
- <view class="message-item" @click="navToSystemMsg">
- <view class="icon-wrapper">
- <image class="msg-icon" src="/static/icons/icon_system_msg.svg"></image>
- </view>
- <view class="content-wrapper">
- <view class="top-row">
- <text class="msg-title">系统消息</text>
- <text class="msg-time">7天前</text>
- </view>
- <text class="msg-preview">你的健康证明认证审核已通过。</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {}
- },
- methods: {
- navBack() {
- uni.navigateBack();
- },
- navToOrderMsg() {
- uni.navigateTo({
- url: '/pages/mine/message/order'
- });
- },
- navToSystemMsg() {
- uni.navigateTo({
- url: '/pages/mine/message/system'
- });
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #fff;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
- }
- .nav-bar {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 88rpx;
- padding-top: var(--status-bar-height);
- background-color: #fff;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 30rpx;
- padding-top: var(--status-bar-height); /* Ensure padding top includes status bar */
- box-sizing: border-box;
- z-index: 100;
- border-bottom: 1rpx solid #f5f5f5;
- }
- .nav-placeholder {
- height: calc(88rpx + var(--status-bar-height));
- }
- .back-icon {
- width: 40rpx;
- height: 40rpx;
- }
- .nav-title {
- font-size: 34rpx;
- font-weight: bold;
- color: #333;
- }
- .nav-right {
- width: 40rpx;
- display: flex;
- justify-content: flex-end;
- }
- .more-dots {
- display: flex;
- gap: 4rpx;
- }
- .dot {
- width: 6rpx;
- height: 6rpx;
- background-color: #333;
- border-radius: 50%;
- }
- .message-list {
- padding: 0 30rpx;
- }
- .message-item {
- display: flex;
- align-items: center;
- padding: 30rpx 0;
- border-bottom: 1rpx solid #f5f5f5;
- }
- .icon-wrapper {
- position: relative;
- margin-right: 30rpx;
- }
- .msg-icon {
- width: 96rpx;
- height: 96rpx;
- border-radius: 50%;
- }
- .red-dot-badge {
- position: absolute;
- top: 0;
- right: 0;
- width: 16rpx;
- height: 16rpx;
- background-color: #FF3B30;
- border-radius: 50%;
- border: 2rpx solid #fff;
- }
- .content-wrapper {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- .top-row {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 10rpx;
- }
- .msg-title {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- }
- .msg-time {
- font-size: 24rpx;
- color: #999;
- }
- .msg-preview {
- font-size: 26rpx;
- color: #666;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- width: 500rpx;
- }
- </style>
|