From c1c8cb8441125f27da3e2dd53052d1c36a82cc01 Mon Sep 17 00:00:00 2001 From: jscyl13849007907 <13849007907@163.com> Date: Fri, 29 Aug 2025 14:48:08 +0800 Subject: [PATCH] no message --- .../conversation-list/conversation-item.vue | 3 +-- .../pages/Conversation/conversation-list/index.vue | 20 ++++++++++++++++++-- root/NEUIKit/pages/Chat/index.vue | 8 +++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue b/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue index 0327828..69ee7ea 100644 --- a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue +++ b/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue @@ -147,7 +147,7 @@ const lastMsgContent = computed(() => { if (sendingState === V2NIMConst.V2NIMMessageSendingState.V2NIM_MESSAGE_SENDING_STATE_FAILED) { return t("conversationSendFailText"); } - console.log("lastMsg", lastMsg); + console.log("lastMsglastMsglastMsg", lastMsg); let _str = "[多媒体]"; if (!lastMsg.text && lastMsg.attachment && lastMsg.attachment.raw) { @@ -164,7 +164,6 @@ const lastMsgContent = computed(() => { _str = "[图片]"; } - console.log("lastMsg.text", lastMsg.text, " -- ", _str); return getMsgContentTipByType({ messageType: lastMsg.messageType, text: lastMsg.text ? lastMsg.text : _str, diff --git a/pages/NEUIKit/pages/Conversation/conversation-list/index.vue b/pages/NEUIKit/pages/Conversation/conversation-list/index.vue index a235e8c..fd4dd3f 100644 --- a/pages/NEUIKit/pages/Conversation/conversation-list/index.vue +++ b/pages/NEUIKit/pages/Conversation/conversation-list/index.vue @@ -5,7 +5,15 @@
- +
@@ -63,8 +71,16 @@ const handleSessionItemClick = async (conversation: V2NIMConversation) => { flag = true; await uni.$UIKitStore.uiStore.selectConversation(conversation.conversationId); + console.log("handleSessionItemClick", conversation); + const itemUserInfo = await uni.$UIKitStore.userStore.getUserActive(conversation.conversationId.split('|')[2]) + let _title = ''; + if(itemUserInfo.serverExtension){ + _title = '@' + JSON.parse(itemUserInfo.serverExtension).fullName; + }else{ + _title = ''; + } customNavigateTo({ - url: "/pages/Chat/index", + url: "/pages/Chat/index?ctitle=" + _title, }); } catch { uni.showToast({ diff --git a/root/NEUIKit/pages/Chat/index.vue b/root/NEUIKit/pages/Chat/index.vue index fcb4cb7..1a69b2b 100644 --- a/root/NEUIKit/pages/Chat/index.vue +++ b/root/NEUIKit/pages/Chat/index.vue @@ -397,10 +397,14 @@ const scrollToBottom = () => { }, 300); }; -onLoad(() => { +onLoad((options) => { uni.$on(events.HANDLE_MOVE_THROUGH, (flag) => { moveThrough.value = flag; }); + + uni.setNavigationBarTitle({ + title: options.ctitle, + }); }); const msgHeight = ref(0); onMounted(() => { @@ -420,6 +424,8 @@ onMounted(() => { uni.$UIKitNIM.V2NIMTeamService.on("onTeamLeft", handleRemoveTeamMembers); uni.$on(events.GET_HISTORY_MSG, loadMoreMsgs); + + }); onUnmounted(() => {