wangxia 3 months ago
commit b5d12387c7

@ -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,

@ -5,7 +5,15 @@
<div class="conversation-list-wrapper " v-if="conversationList && conversationList.length > 0">
<!-- 此处的key如果用session.id会在ios上渲染存在问题会出现会话列表显示undefined -->
<div v-for="(conversation, index) in conversationList" class="" style="min-height:72px" :key="conversation.renderKey">
<ConversationItem :key="conversation.renderKey" :loading="loading" :showMoreActions="currentMoveSessionId === conversation.conversationId" :conversation="conversation" @delete="handleSessionItemDeleteClick" :heihei="'mmp' + index" @stickyToTop="handleSessionItemStickTopChange" @click="handleSessionItemClick" @leftSlide="handleSessionItemLeftSlide" />
<ConversationItem :key="conversation.renderKey" :loading="loading"
:showMoreActions="currentMoveSessionId === conversation.conversationId"
:conversation="conversation"
@delete="handleSessionItemDeleteClick"
:heihei="'mmp' + index"
@stickyToTop="handleSessionItemStickTopChange"
@click="handleSessionItemClick"
@leftSlide="handleSessionItemLeftSlide"
/>
</div>
</div>
<!-- <div style="height: 48px; background-color: #ededed" v-if="conversationList && conversationList.length > 0"></div> -->
@ -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({

@ -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(() => {

@ -63,7 +63,7 @@
</div>
</div>
<!--键盘高度{{keyHeight}} 输入框距离底部距离{{writeStyle}}屏幕高度{{screenHeight}}顶部聊天区域高度{{msgKeyHeight}}-->
<!-- {{ssff}}键盘高度{{keyHeight}} 输入框距离底部距离{{writeStyle}}屏幕高度{{screenHeight}}顶部聊天区域高度{{msgKeyHeight}} -->
<input v-show="!showEmojiInput" :focus="isFocus" class="msg-input-input g_flex_1" :maxlength="-1" :placeholder="isTeamMute ? t('teamMutePlaceholder') : t('chatInputPlaceHolder')" v-model="inputText" type="text" :disabled="isTeamMute" :confirm-hold="true" cursor-spacing="20" :adjust-position="pushUp" confirm-type="send" @keyboardheightchange="keyboardheightchange" @confirm="handleSendTextMsg" @blur="handleInputBlur" @input="handleInput" id="msg-input" />
</div>
@ -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.vuekeyboardheightchange
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.vuekeyboardheightchange
// message-input.vuekeyboardheightchange
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;

@ -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%'
}

@ -1,5 +1,5 @@
<template>
<div class="wrapper g_bg_f_5">
<div class="wrapper g_bg_f_5" style="background-color: #ededed;">
<!-- <NavBar :title="t('PersonalPageText')" /> -->
<div style="height: 10px;"></div>
<div class="userInfo-item-wrapper">

@ -10,8 +10,8 @@ let data = {
fadanBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/",
loginText: '请登录',
coziID: '7537572244600471579',
// baseUrl:"https://daotian.matripe.com.cn",// 网络请求的基础路径
baseUrl: "http://192.168.3.83:8001", // 网络请求的基础路径
baseUrl:"https://daotian.matripe.com.cn",// 网络请求的基础路径
// baseUrl: "http://192.168.3.83:8001", // 网络请求的基础路径
// #ifdef MP-WEIXIN
version: uni.getAccountInfoSync().miniProgram.version || "1.0.16",
// #endif

Loading…
Cancel
Save