fix:【站内信】

This commit is contained in:
zpaeng
2025-08-22 11:15:45 +08:00
parent 84ab87878a
commit a74cb0c272
5 changed files with 301 additions and 215 deletions

View File

@@ -34,7 +34,7 @@
<div class="message-text" v-html="renderMarkdown(msg.content)"></div>
</div>
<div class="message-timestamp">
{{ formatMessageTime(msg.createdAt) }}
{{ TimeManager.format(msg.createdAt) }}
</div>
</div>
</div>
@@ -55,11 +55,11 @@ import { ref, onMounted, onUnmounted, nextTick, computed, watch, onActivated, on
import { useRoute } from 'vue-router';
import { getToken, fetchCurrentUser } from '~/utils/auth';
import { toast } from '~/main';
import { formatMessageTime } from '~/utils/messageTime';
import { renderMarkdown } from '~/utils/markdown';
import MessageEditor from '~/components/MessageEditor.vue';
import { useWebSocket } from '~/composables/useWebSocket';
import { useUnreadCount } from '~/composables/useUnreadCount';
import TimeManager from '~/utils/time'
const config = useRuntimeConfig();
const route = useRoute();

View File

@@ -61,9 +61,9 @@ import { ref, onMounted, onUnmounted, watch, onActivated } from 'vue';
import { useRouter } from 'vue-router';
import { getToken, fetchCurrentUser } from '~/utils/auth'
import { toast } from '~/main'
import { formatMessageTime } from '~/utils/messageTime'
import { useWebSocket } from '~/composables/useWebSocket';
import { useUnreadCount } from '~/composables/useUnreadCount';
import TimeManager from '~/utils/time'
const config = useRuntimeConfig()
const conversations = ref([]);
@@ -108,7 +108,7 @@ function getOtherParticipant(conversation) {
// 格式化时间
function formatTime(timeString) {
if (!timeString) return ''
return formatMessageTime(timeString)
return TimeManager.format(timeString)
}
// 头像加载失败处理