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 1/2] 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(() => { From 1acb9ac8b4af991a0882d9c956290965add6af3a Mon Sep 17 00:00:00 2001 From: jscyl13849007907 <13849007907@163.com> Date: Fri, 29 Aug 2025 14:55:09 +0800 Subject: [PATCH 2/2] no message --- pages/NEUIKit/pages/Conversation/conversation-list/index.vue | 5 ++--- root/NEUIKit/pages/Chat/index.vue | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pages/NEUIKit/pages/Conversation/conversation-list/index.vue b/pages/NEUIKit/pages/Conversation/conversation-list/index.vue index fd4dd3f..6a68564 100644 --- a/pages/NEUIKit/pages/Conversation/conversation-list/index.vue +++ b/pages/NEUIKit/pages/Conversation/conversation-list/index.vue @@ -71,13 +71,12 @@ 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; + _title = itemUserInfo.name + '@' + JSON.parse(itemUserInfo.serverExtension).fullName; }else{ - _title = ''; + _title = itemUserInfo.name; } customNavigateTo({ url: "/pages/Chat/index?ctitle=" + _title, diff --git a/root/NEUIKit/pages/Chat/index.vue b/root/NEUIKit/pages/Chat/index.vue index 1a69b2b..b3c23a4 100644 --- a/root/NEUIKit/pages/Chat/index.vue +++ b/root/NEUIKit/pages/Chat/index.vue @@ -375,9 +375,6 @@ const setNavTitle = () => { const subTitle = `(${team?.memberCount || 0})`; title.value = (team?.name || "") + subTitle; } - uni.setNavigationBarTitle({ - title: title.value, - }); }; onShow(function () { @@ -401,7 +398,7 @@ onLoad((options) => { uni.$on(events.HANDLE_MOVE_THROUGH, (flag) => { moveThrough.value = flag; }); - + console.log("options聊天", options); uni.setNavigationBarTitle({ title: options.ctitle, });