diff --git a/frontend/src/pages.json b/frontend/src/pages.json
index 2f8d7e5..d80829a 100644
--- a/frontend/src/pages.json
+++ b/frontend/src/pages.json
@@ -62,6 +62,25 @@
"navigationBarTitleText": "黑名单"
}
},
+ {
+ "path": "pages/chat/conversation",
+ "style": {
+ "navigationBarTitleText": "聊天",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/chat/settings",
+ "style": {
+ "navigationBarTitleText": "聊天设置"
+ }
+ },
+ {
+ "path": "pages/chat/search",
+ "style": {
+ "navigationBarTitleText": "搜索消息"
+ }
+ },
{
"path": "pages/meeting/index",
"style": {
diff --git a/frontend/src/pages/chat/conversation.vue b/frontend/src/pages/chat/conversation.vue
new file mode 100644
index 0000000..b5cd5de
--- /dev/null
+++ b/frontend/src/pages/chat/conversation.vue
@@ -0,0 +1,491 @@
+
+
+
+
+
+
+ ❮
+
+
+ {{ peerName || '聊天' }}
+ 正在输入...
+
+
+ ⋯
+
+
+
+
+
+
+
+ {{ loadingMore ? '加载中...' : '上拉加载更多' }}
+
+
+
+
+
+
+
+
+ {{ (peerName || '?')[0] }}
+
+
+
+
+
+ 消息已撤回
+ {{ msg.content }}
+
+
+
+
+ ⌛
+
+
+ ⚠
+
+
+
+
+
+
+
+
+
+
+
+
+ ➤
+
+
+
+
+
+
+
+
diff --git a/frontend/src/pages/chat/index.vue b/frontend/src/pages/chat/index.vue
index 29405e2..a0b8dcf 100644
--- a/frontend/src/pages/chat/index.vue
+++ b/frontend/src/pages/chat/index.vue
@@ -1,30 +1,172 @@
-
- 💬
- 消息
- 即时通讯功能开发中…
+
+
+
+
+
+
+
+ 💬
+ 暂无消息
+ 找好友聊聊天吧
+
+
+
+
+
+
+
+
+ {{ (conv.peer_nickname || '?')[0] }}
+
+
+ {{ conv.unread_count > 99 ? '99+' : conv.unread_count }}
+
+
+
+
+
+
+ {{ conv.peer_nickname || '未知用户' }}
+ {{ formatTime(conv.last_msg_time) }}
+
+
+ 对方正在输入...
+
+ {{ conv.last_msg_content || ' ' }}
+
+
+ 📌
+
+
+
+
+
+
@@ -35,28 +177,189 @@ export default {
padding-bottom: 120rpx;
}
-.placeholder-content {
+.header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0 32rpx;
+ height: 88rpx;
+ padding-top: var(--status-bar-height, 44px);
+ background-color: #FFFFFF;
+}
+
+.header-title {
+ font-size: 36rpx;
+ font-weight: 700;
+ color: #1E293B;
+}
+
+.header-actions {
+ display: flex;
+ gap: 16rpx;
+}
+
+.action-btn {
+ width: 64rpx;
+ height: 64rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 16rpx;
+ background-color: #F1F5F9;
+}
+
+.action-icon {
+ font-size: 32rpx;
+ color: #475569;
+}
+
+/* 会话列表 */
+.conv-list {
+ height: calc(100vh - 88rpx - var(--status-bar-height, 44px) - 120rpx);
+}
+
+.conv-item {
+ display: flex;
+ align-items: center;
+ padding: 24rpx 32rpx;
+ background-color: #FFFFFF;
+ border-bottom: 1rpx solid #F1F5F9;
+}
+
+.conv-pinned {
+ background-color: #F8FAFC;
+}
+
+/* 头像 */
+.conv-avatar-wrap {
+ position: relative;
+ flex-shrink: 0;
+ margin-right: 24rpx;
+}
+
+.conv-avatar {
+ width: 96rpx;
+ height: 96rpx;
+ border-radius: 24rpx;
+}
+
+.conv-avatar-placeholder {
+ background-color: #2563EB;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.avatar-text {
+ color: #FFFFFF;
+ font-size: 36rpx;
+ font-weight: 600;
+}
+
+.conv-badge {
+ position: absolute;
+ top: -8rpx;
+ right: -8rpx;
+ min-width: 36rpx;
+ height: 36rpx;
+ padding: 0 8rpx;
+ background-color: #EF4444;
+ border-radius: 18rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.conv-badge-text {
+ color: #FFFFFF;
+ font-size: 20rpx;
+ line-height: 36rpx;
+}
+
+/* 信息区 */
+.conv-info {
+ flex: 1;
+ overflow: hidden;
+}
+
+.conv-top {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 8rpx;
+}
+
+.conv-name {
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #1E293B;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 400rpx;
+}
+
+.conv-time {
+ font-size: 24rpx;
+ color: #94A3B8;
+ flex-shrink: 0;
+}
+
+.conv-bottom {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.conv-preview {
+ font-size: 26rpx;
+ color: #94A3B8;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 480rpx;
+}
+
+.conv-preview-unread {
+ color: #64748B;
+ font-weight: 500;
+}
+
+.conv-typing {
+ font-size: 26rpx;
+ color: #2563EB;
+}
+
+.conv-pin-tag {
+ flex-shrink: 0;
+}
+
+.pin-icon {
+ font-size: 22rpx;
+}
+
+/* 空状态 */
+.empty-state {
display: flex;
flex-direction: column;
align-items: center;
- justify-content: center;
- padding-top: 300rpx;
+ padding-top: 200rpx;
}
-.placeholder-icon {
+.empty-icon {
font-size: 80rpx;
margin-bottom: 24rpx;
}
-.placeholder-title {
- font-size: 36rpx;
+.empty-text {
+ font-size: 32rpx;
font-weight: 600;
color: #1E293B;
- margin-bottom: 12rpx;
+ margin-bottom: 8rpx;
}
-.placeholder-desc {
- font-size: 28rpx;
+.empty-hint {
+ font-size: 26rpx;
color: #94A3B8;
}