From df60073f4fb06ea2d16984635e0714bae8a1f8e9 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Mon, 22 Dec 2025 18:03:35 +0800
Subject: [PATCH] 1.在总后台首页装修增加了活动专区和智能匹配 模块 2.目前活动专区获取的是发布需求最新的数据,智能匹配是用户没登录前也是获取发布需求最新数据,登录后会根据用户发布的需求,通过分类匹配到对应的数据 3.修复缴纳保证金报错 4.修复发布需求报错

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

diff --git a/mobile/pages/plus/business/chat/list.vue b/mobile/pages/plus/business/chat/list.vue
index caa120f..6642c51 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++;
 						}
@@ -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