diff --git a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue b/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue index e31ea16..69ee7ea 100644 --- a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue +++ b/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue @@ -147,11 +147,15 @@ 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) { - _str = "[职位] " + JSON.parse(lastMsg.attachment.raw).title; + if(!lastMsg.text && lastMsg.attachment && lastMsg.attachment.raw && lastMsg.attachment.ext == '.mp4' && lastMsg.attachment.url){ + _str = "[视频]"; + }else{ + _str = "[职位] " + JSON.parse(lastMsg.attachment.raw).title; + } } if (!lastMsg.text && lastMsg.attachment && lastMsg.attachment.ext == ".mp3") { _str = "[语音]"; @@ -160,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..6a68564 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,15 @@ const handleSessionItemClick = async (conversation: V2NIMConversation) => { flag = true; await uni.$UIKitStore.uiStore.selectConversation(conversation.conversationId); + const itemUserInfo = await uni.$UIKitStore.userStore.getUserActive(conversation.conversationId.split('|')[2]) + let _title = ''; + if(itemUserInfo.serverExtension){ + _title = itemUserInfo.name + '@' + JSON.parse(itemUserInfo.serverExtension).fullName; + }else{ + _title = itemUserInfo.name; + } 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..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 () { @@ -397,10 +394,14 @@ const scrollToBottom = () => { }, 300); }; -onLoad(() => { +onLoad((options) => { uni.$on(events.HANDLE_MOVE_THROUGH, (flag) => { moveThrough.value = flag; }); + console.log("options聊天", options); + uni.setNavigationBarTitle({ + title: options.ctitle, + }); }); const msgHeight = ref(0); onMounted(() => { @@ -420,6 +421,8 @@ onMounted(() => { uni.$UIKitNIM.V2NIMTeamService.on("onTeamLeft", handleRemoveTeamMembers); uni.$on(events.GET_HISTORY_MSG, loadMoreMsgs); + + }); onUnmounted(() => { diff --git a/root/NEUIKit/pages/Chat/message/message-input.vue b/root/NEUIKit/pages/Chat/message/message-input.vue index 8b10ed9..63c91b3 100644 --- a/root/NEUIKit/pages/Chat/message/message-input.vue +++ b/root/NEUIKit/pages/Chat/message/message-input.vue @@ -63,7 +63,7 @@ - + @@ -361,53 +361,74 @@ const pushUp = ref(false); const keyHeight = ref(350); const msgKeyHeight = ref("100%"); +const ssff = ref(uni.getWindowInfo().safeArea.top); -// 在message-input.vue的keyboardheightchange事件中修改 -const keyboardheightchange = (e) => { - keyHeight.value = e.detail.height; - uni.$emit(events.KeyboardEvent, e.detail.height); - uni.$emit("KeyboardHeight", e.detail.height); - - if (e.detail.height === 0) { - writeStyle.value = "bottom: 0"; - uni.$emit("msgKeyHeight", "100%"); // 键盘收起时恢复全屏高度 - } else { - // 隐藏其他面板 - emojiVisible.value = false; - extVisible.value = false; - audioPanelVisible.value = false; - sendMoreVisible.value = false; - - // 统一计算安全区域(适配APP和小程序) - const systemInfo = uni.getSystemInfoSync(); - const safeBottom = systemInfo.safeAreaInsets?.bottom || 0; - // 计算会话区域可用高度 = 屏幕高度 - 键盘高度 - 安全区域底部 +console.log('安全域高度安全域高度安全域高度安全域高度安全域高度安全域高度',ssff); - // 输入框定位适配 - // #ifdef MP-WEIXIN - const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 120; - uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度 - - writeStyle.value = `bottom: calc(${e.detail.height}px + env(safe-area-inset-bottom))`; - // #endif - // #ifdef APP-PLUS - // 区分安卓和苹果平台 - let availableHeight, bottomValue; - if (systemInfo.platform === "ios") { - // 苹果设备 - availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom; - bottomValue = e.detail.height - safeBottom - 34; - } else { - // 安卓设备 - availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 34; - bottomValue = e.detail.height - safeBottom; - } - - uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度 - writeStyle.value = `bottom: ${bottomValue}px`; - // #endif - } -}; +// 在message-input.vue的keyboardheightchange事件中修改 +// 在message-input.vue的keyboardheightchange事件中修改 + const keyboardheightchange = (e) => { + keyHeight.value = e.detail.height; + uni.$emit(events.KeyboardEvent, e.detail.height); + uni.$emit('KeyboardHeight', e.detail.height); + + if (e.detail.height === 0) { + writeStyle.value = "bottom: 0"; + uni.$emit('msgKeyHeight', '100%'); // 键盘收起时恢复全屏高度 + } else { + // 隐藏其他面板 + emojiVisible.value = false; + extVisible.value = false; + audioPanelVisible.value = false; + sendMoreVisible.value = false; + + const systemInfo = uni.getSystemInfoSync(); + // let safeBottom = 0; + + // // #ifdef MP-WEIXIN + // if (systemInfo.safeAreaInsets && systemInfo.safeAreaInsets.bottom) { + // safeBottom = systemInfo.safeAreaInsets.bottom; + // } + // // #endif + + // // #ifdef APP-PLUS + // if (systemInfo.safeAreaInsets && systemInfo.safeAreaInsets.bottom) { + // safeBottom = systemInfo.safeAreaInsets.bottom; + // } + // // #endif + + // // 输入框定位适配 + // // #ifdef MP-WEIXIN + // if (systemInfo.platform === 'ios') { + // const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value; + // uni.$emit('msgKeyHeight', availableHeight); // 传递实际可用高度 + // }else{ + // const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value; + // uni.$emit('msgKeyHeight', availableHeight); // 传递实际可用高度 + // } + + const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value; + uni.$emit('msgKeyHeight', availableHeight); // 传递实际可用高度 + writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; + // #endif + // #ifdef APP-PLUS + // 区分安卓和苹果平台 + let availableHeight, bottomValue; + if (systemInfo.platform === 'ios') { + // 苹果设备 + availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom; + bottomValue = e.detail.height - safeBottom - 34; + } else { + // 安卓设备 + availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 34; + bottomValue = e.detail.height - safeBottom; + } + + uni.$emit('msgKeyHeight', availableHeight); // 传递实际可用高度 + writeStyle.value = `bottom: ${bottomValue}px`; + // #endif + } + }; const handleInputBlur = () => { isFocus.value = false; diff --git a/root/NEUIKit/pages/Chat/message/message-list.vue b/root/NEUIKit/pages/Chat/message/message-list.vue index 794ef30..65eafe7 100644 --- a/root/NEUIKit/pages/Chat/message/message-list.vue +++ b/root/NEUIKit/pages/Chat/message/message-list.vue @@ -151,7 +151,7 @@ screenHeight1.value = res; // 无论是否为小程序,都直接应用高度(移除100%的特殊处理) if (typeof res === 'number') { - msgKeyHeight.value = `${res * 2}rpx`; + msgKeyHeight.value = `${res - 34}px`; } else { msgKeyHeight.value = res; // 处理'100%'的情况 } diff --git a/root/NEUIKit/pages/user-card/my-detail/index.vue b/root/NEUIKit/pages/user-card/my-detail/index.vue index e8a249b..8c40113 100644 --- a/root/NEUIKit/pages/user-card/my-detail/index.vue +++ b/root/NEUIKit/pages/user-card/my-detail/index.vue @@ -1,5 +1,5 @@