Browse Source

【功能完善】商城: 客服动态计算消息最后发送时间距离现在过去了多久

YunaiV 8 months ago
parent
commit
7895d184e8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/views/mall/promotion/kefu/components/KeFuConversationList.vue

+ 2 - 1
src/views/mall/promotion/kefu/components/KeFuConversationList.vue

@@ -89,14 +89,15 @@ const { replaceEmoji } = useEmoji()
 const activeConversationId = ref(-1) // 选中的会话
 const collapse = computed(() => appStore.getCollapse) // 折叠菜单
 
-const lastMessageTimeMap = ref<Map<number, string>>(new Map<number, string>())
 /** 计算消息最后发送时间距离现在过去了多久 */
+const lastMessageTimeMap = ref<Map<number, string>>(new Map<number, string>())
 const calculationLastMessageTime = () => {
   kefuStore.getConversationList?.forEach((item) => {
     lastMessageTimeMap.value.set(item.id, formatPast(item.lastMessageTime, 'YYYY-MM-DD'))
   })
 }
 defineExpose({ calculationLastMessageTime })
+
 /** 打开右侧的消息列表 */
 const emits = defineEmits<{
   (e: 'change', v: KeFuConversationRespVO): void