|
@@ -91,12 +91,15 @@ const showPage = computed(() => groupId.value)
|
|
|
|
|
|
const initGroupId = async () => {
|
|
|
try {
|
|
|
-/* if (!groupId.value) return;
|
|
|
+ if (!groupId.value) return;
|
|
|
+/*
|
|
|
pageLoading.value = true;
|
|
|
const res = await chatsStore.getCurrConversationId(getUserId.value)
|
|
|
await handleResponse(res)
|
|
|
groupId.value = res.data;*/
|
|
|
+ await getAnnouncement()
|
|
|
await getChatList('init')
|
|
|
+
|
|
|
} catch (e) {
|
|
|
|
|
|
} finally {
|
|
@@ -188,7 +191,10 @@ const sendImageMessage = async (file) => {
|
|
|
messageType: 1,
|
|
|
noticeType: 2,
|
|
|
object: {
|
|
|
- id: getLocalId()
|
|
|
+ id: getLocalId(),
|
|
|
+ // TODO 聊天时候改了头像昵称 会出现找不到的情况
|
|
|
+ headImageUrl: userInfo?.value.headImageUrl,
|
|
|
+ showName: userInfo?.value.showName
|
|
|
}
|
|
|
}
|
|
|
currConversationChatList.value.push(msg)
|
|
@@ -263,7 +269,7 @@ function getLocalId() {
|
|
|
|
|
|
onMounted(() => {
|
|
|
initGroupId()
|
|
|
- getAnnouncement()
|
|
|
+
|
|
|
XYWebSocket.SocketEventsBus.on(XYWebSocket.SocketEvents.chatEvent, async (chat) => {
|
|
|
const isCurrGroupId = chat.groupId && chat.groupId === groupId.value;
|
|
|
const isOtherUserMessage = chat.sendUserId && chatsStore.isRealMessage(chat.sendUserId);
|