修改消息通知页面

This commit is contained in:
JACKYMYPERSON
2025-09-28 17:45:40 +08:00
parent f78448e8da
commit ea1ee70781
3 changed files with 291 additions and 429 deletions

View File

@@ -1,181 +1,127 @@
.notification-page {
background-color: #f5f5f5;
min-height: 100vh;
}
/* 导航栏样式 */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
background-color: white;
border-bottom: 1px solid #eee;
}
.navbar-title {
font-size: 18px;
font-weight: 600;
color: #333;
}
.mark-read {
font-size: 14px;
color: #07c160;
}
/* 标签样式 */
.tabs {
display: flex;
background-color: white;
border-bottom: 1px solid #eee;
overflow-x: auto;
white-space: nowrap;
}
.tab-item {
display: inline-flex;
align-items: center;
padding: 14px 20px;
font-size: 15px;
color: #666;
position: relative;
}
.tab-item.active {
color: #07c160;
}
.tab-item.active::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 2px;
background-color: #07c160;
}
.badge {
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
border-radius: 50%;
background-color: #ff3b30;
color: white;
font-size: 12px;
margin-left: 6px;
}
/* 通知列表样式 */
.notification-list {
padding-bottom: 20px;
}
.notification-item {
display: flex;
padding: 16px;
background-color: white;
border-bottom: 1px solid #eee;
transition: background-color 0.2s;
}
.notification-item:active {
background-color: #f9f9f9;
}
.avatar-container {
position: relative;
margin-right: 14px;
}
.avatar {
width: 40px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 16px;
font-weight: 500;
}
.system-avatar {
background-color: #07c160;
}
.activity-avatar {
background-color: #ff9500;
}
.message-avatar {
background-color: #007aff;
}
.unread-dot {
position: absolute;
top: -2px;
right: -2px;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ff3b30;
}
.notification-content {
flex: 1;
overflow: hidden;
}
.notification-header {
display: flex;
justify-content: space-between;
margin-bottom: 4px;
}
.title {
font-size: 16px;
color: #333;
font-weight: 500;
max-width: 80%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.time {
font-size: 12px;
color: #999;
}
.message {
font-size: 14px;
color: #666;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.4;
}
/* 空状态样式 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 0;
color: #999;
}
.empty-icon {
font-size: 60px;
margin-bottom: 20px;
}
.empty-text {
font-size: 16px;
}
/* message.wxss */
page {
background-color: #f4f6f8;
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.container {
padding: 32rpx;
}
/* 卡片样式 */
.card {
background-color: #ffffff;
border-radius: 20rpx;
margin-bottom: 32rpx;
padding: 32rpx;
box-shadow: 0 4rpx T12rpx rgba(0, 0, 0, 0.08);
transition: all 0.2s ease-in-out;
}
.card:last-child {
margin-bottom: 0;
}
/* 卡片头部 */
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
}
.card-title-box {
display: flex;
align-items: center;
}
.card-icon {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.card-title {
font-size: 32rpx;
font-weight: 600;
color: #333333;
}
.card-time {
font-size: 24rpx;
color: #999999;
}
/* 卡片内容 */
.card-body {
padding: 16rpx 0;
}
.card-content {
font-size: 28rpx;
color: #555555;
line-height: 1.6;
/* 最多显示两行,超出部分显示省略号 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
/* 分割线 */
.divider {
height: 1rpx;
background-color: #e9e9e9;
margin-top: 24rpx;
}
/* 卡片脚部 */
.card-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 24rpx;
font-size: 28rpx;
color: #576b95; /* 微信主题链接色 */
}
.arrow {
font-size: 36rpx;
color: #cccccc;
}
/* 点击态样式 */
.cell-hover {
background-color: #f7f7f7;
}
/* 无消息提示 */
.no-message {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-top: 200rpx;
color: #999;
}
.no-message-icon {
width: 180rpx;
height: 180rpx;
margin-bottom: 20rpx;
}
/* --- 新增样式 --- */
/* 未读红点样式 */
.unread-dot {
width: 16rpx;
height: 16rpx;
background-color: #fa5151; /* 微信主题红色 */
border-radius: 50%;
margin-left: 12rpx;
}
.card-hover {
transform: scale(0.99);
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1);
}