From 04102f7237efefa744090ed7c25f7b5d0807b679 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Thu, 05 Feb 2026 18:11:57 +0800
Subject: [PATCH] 完成运营中心提现和运营中心权限管理

---
 mobile/pages/plus/business/chat/list.vue |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/mobile/pages/plus/business/chat/list.vue b/mobile/pages/plus/business/chat/list.vue
index caa120f..a0afa34 100644
--- a/mobile/pages/plus/business/chat/list.vue
+++ b/mobile/pages/plus/business/chat/list.vue
@@ -31,12 +31,12 @@
 					<view class="content">
 						<view class="header">
 							<text class="name">{{ getConversationName(conversation) }}</text>
-							<text class="time">{{ formatTime(conversation.update_time) }}</text>
+							<text class="time">{{ formatTime((conversation.last_message?conversation.last_message.send_time:conversation.update_time)) }}</text>
 						</view>
 						
 						<view class="message">
-						<text class="text" v-if="conversation.last_message && conversation.last_message.length > 0">
-							{{ conversation.last_message[0].sender_id === currentUser.user_id ? '我: ' : '' }}{{ conversation.last_message[0].content }}
+						<text class="text" v-if="conversation.last_message ">
+							{{ conversation.last_message.sender_id === currentUser.user_id ? '我: ' : '' }}{{ conversation.last_message.content }}
 						</text>
 						<text class="text" v-else>开始聊天</text>
 					</view>
@@ -126,7 +126,7 @@
 							} else {
 								self.conversations = [...self.conversations, ...newConversations];
 							}
-							
+							console.log(self.conversations);
 							self.hasMore = self.conversations.length < (conversationData.total || 0);
 							self.page++;
 						}
@@ -186,7 +186,7 @@
 				const targetUser = this.getTargetUser(conversation);
 				
 				uni.navigateTo({
-					url: `/pages/plus/business/chat/chat?user_id=${targetUser.user_id}&business_card_id=${conversation.business_card_id}&nickName=${targetUser.nickName}`
+					url: `/pages/plus/business/chat/chat?user_id=${targetUser.user_id}&business_card_id=${conversation.business_card_id}&nickName=${targetUser.nickName}&conversation_id=${conversation.conversation_id}`
 				});
 			},
 			
@@ -234,10 +234,11 @@
 			
 			// 格式化时间
 			formatTime(timeStr) {
+				console.log(timeStr);
 				if (!timeStr) return '';
-				
+				const formattedTimeStr = typeof timeStr === 'string' ? timeStr.replace(/\-/g, '/') : timeStr * 1000;
 				// 处理字符串格式的时间
-				const date = new Date(timeStr);
+				const date = new Date(formattedTimeStr);
 				const now = new Date();
 				
 				// 今天的消息显示时间

--
Gitblit v1.9.2