|
@@ -233,38 +233,38 @@
|
|
|
<!-- 置顶绘画列表 "-->
|
|
|
<div v-if="isTopList?.length && activeNames" class="w-full">
|
|
|
<template v-for="(item, index) in isTopList" :key="item?.id">
|
|
|
- <template v-if="index > 2">
|
|
|
- <!-- 群聊会话 -->
|
|
|
- <ProfileNewsGroupChat
|
|
|
- v-if="item?.noticeType == 2"
|
|
|
- :item-data="{
|
|
|
- ...item,
|
|
|
- updateTime: item?.lastMessage
|
|
|
- ? createTimeSplit(item?.lastMessage?.updateTime)
|
|
|
- : ''
|
|
|
- }"
|
|
|
- @on-chat-page="goDetails('group', item)"
|
|
|
- @on-no-bother="noBother(item)"
|
|
|
- @on-is-top="onIsTop(item)"
|
|
|
- @on-conv-delete="onIsShow(item)"
|
|
|
- />
|
|
|
+ <!-- <template v-if="index > 2"> -->
|
|
|
+ <!-- 群聊会话 -->
|
|
|
+ <ProfileNewsGroupChat
|
|
|
+ v-if="item?.noticeType == 2"
|
|
|
+ :item-data="{
|
|
|
+ ...item,
|
|
|
+ updateTime: item?.lastMessage
|
|
|
+ ? createTimeSplit(item?.lastMessage?.updateTime)
|
|
|
+ : ''
|
|
|
+ }"
|
|
|
+ @on-chat-page="goDetails('group', item)"
|
|
|
+ @on-no-bother="noBother(item)"
|
|
|
+ @on-is-top="onIsTop(item)"
|
|
|
+ @on-conv-delete="onIsShow(item)"
|
|
|
+ />
|
|
|
|
|
|
- <!-- 单聊会话 -->
|
|
|
- <ProfileNewsSingleChat
|
|
|
- v-if="item?.noticeType == 1"
|
|
|
- :item-data="{
|
|
|
- ...item,
|
|
|
- updateTime: item?.lastMessage
|
|
|
- ? createTimeSplit(item?.lastMessage?.updateTime)
|
|
|
- : ''
|
|
|
- }"
|
|
|
- @on-chat-page="goDetails('single', item)"
|
|
|
- @on-no-bother="noBother(item)"
|
|
|
- @on-is-top="onIsTop(item)"
|
|
|
- @on-conv-delete="onIsShow(item)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-else></template>
|
|
|
+ <!-- 单聊会话 -->
|
|
|
+ <ProfileNewsSingleChat
|
|
|
+ v-if="item?.noticeType == 1"
|
|
|
+ :item-data="{
|
|
|
+ ...item,
|
|
|
+ updateTime: item?.lastMessage
|
|
|
+ ? createTimeSplit(item?.lastMessage?.updateTime)
|
|
|
+ : ''
|
|
|
+ }"
|
|
|
+ @on-chat-page="goDetails('single', item)"
|
|
|
+ @on-no-bother="noBother(item)"
|
|
|
+ @on-is-top="onIsTop(item)"
|
|
|
+ @on-conv-delete="onIsShow(item)"
|
|
|
+ />
|
|
|
+ <!-- </template> -->
|
|
|
+ <!-- <template v-else></template> -->
|
|
|
</template>
|
|
|
</div>
|
|
|
|
|
@@ -318,7 +318,6 @@ import comments from '~/assets/img/chat/comments-white.svg'
|
|
|
import plaza from '~/assets/img/chat/guangchang.svg'
|
|
|
import userAdd from '~/assets/img/chat/user-add.svg'
|
|
|
|
|
|
-import { messageContentParse } from '~/utils/detalTime.js'
|
|
|
import { XYWebSocket } from '~/utils/XYWebSocket.ts'
|
|
|
|
|
|
const actionsList = [
|
|
@@ -489,21 +488,6 @@ const readMessage = async (groupId) => {
|
|
|
await chatsStore.getChatList()
|
|
|
}
|
|
|
|
|
|
-// 消息的内容转换
|
|
|
-function messageShowName(messageContent) {
|
|
|
- try {
|
|
|
- let content = {}
|
|
|
- if (messageContent) {
|
|
|
- content = JSON.parse(messageContent)
|
|
|
- return content.showName
|
|
|
- } else {
|
|
|
- return ''
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- console.log(error)
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
onMounted(() => {
|
|
|
chatsStore.getChatList()
|
|
|
XYWebSocket.SocketEventsBus.on(XYWebSocket.SocketEvents.chatEvent, () => {
|