朋友圈
+
+
+
+
+
@@ -333,6 +350,7 @@ import UserInfoCard from '@/components/common/UserInfoCard.vue'
import VideoPlayer from '@/components/common/VideoPlayer.vue'
import MomentPublisherDark from './MomentPublisherDark.vue'
import MomentNotificationPanel from './MomentNotificationPanel.vue'
+import UserMomentsModal from './UserMomentsModal.vue'
import { parseMediaUrls } from '@/types/moment'
import { formatRelativeTime } from '@/utils/format'
import { storage } from '@/utils/storage'
@@ -348,10 +366,12 @@ const chatStore = useChatStore()
const showPublisher = ref(false)
const showNotifications = ref(false)
const expandedMoments = reactive(new Set
())
+const refreshing = ref(false)
// 用户信息卡片相关
const showUserCard = ref(false)
const selectedUser = ref(null)
+const showUserMomentsModal = ref(false)
// 评论相关
const commentingMoment = ref(null)
@@ -378,6 +398,18 @@ onMounted(() => {
momentStore.fetchUnreadCount()
})
+// 刷新朋友圈
+async function handleRefresh() {
+ if (refreshing.value) return
+ refreshing.value = true
+ try {
+ await momentStore.fetchMoments()
+ await momentStore.fetchUnreadCount()
+ } finally {
+ refreshing.value = false
+ }
+}
+
// 方法
function formatTime(time: string): string {
return formatRelativeTime(time)
@@ -555,6 +587,13 @@ async function handleSendMessage() {
}
}
}
+
+// 从用户信息卡片查看朋友圈
+function handleViewMoments() {
+ if (!selectedUser.value) return
+ showUserCard.value = false
+ showUserMomentsModal.value = true
+}
diff --git a/src/views/chat/ChatView.vue b/src/views/chat/ChatView.vue
index caa4dec..087d2a0 100644
--- a/src/views/chat/ChatView.vue
+++ b/src/views/chat/ChatView.vue
@@ -208,6 +208,12 @@
+
+