mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-06-19 23:02:00 +08:00
【功能完善】商城: 客服动态计算消息最后发送时间距离现在过去了多久
This commit is contained in:
parent
fc5df39b1a
commit
7895d184e8
@ -89,14 +89,15 @@ const { replaceEmoji } = useEmoji()
|
|||||||
const activeConversationId = ref(-1) // 选中的会话
|
const activeConversationId = ref(-1) // 选中的会话
|
||||||
const collapse = computed(() => appStore.getCollapse) // 折叠菜单
|
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 = () => {
|
const calculationLastMessageTime = () => {
|
||||||
kefuStore.getConversationList?.forEach((item) => {
|
kefuStore.getConversationList?.forEach((item) => {
|
||||||
lastMessageTimeMap.value.set(item.id, formatPast(item.lastMessageTime, 'YYYY-MM-DD'))
|
lastMessageTimeMap.value.set(item.id, formatPast(item.lastMessageTime, 'YYYY-MM-DD'))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
defineExpose({ calculationLastMessageTime })
|
defineExpose({ calculationLastMessageTime })
|
||||||
|
|
||||||
/** 打开右侧的消息列表 */
|
/** 打开右侧的消息列表 */
|
||||||
const emits = defineEmits<{
|
const emits = defineEmits<{
|
||||||
(e: 'change', v: KeFuConversationRespVO): void
|
(e: 'change', v: KeFuConversationRespVO): void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user