no message

This commit is contained in:
wangdongbo 2026-02-08 10:38:58 +08:00
parent b73d84f2e4
commit 6c0b60db7b
3 changed files with 8 additions and 20 deletions

View File

@ -6,14 +6,11 @@ $text-color-sub: #999;
$primary-color: #0877F1; $primary-color: #0877F1;
.chat-page { .chat-page {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh;
background-color: #f5f5f5; background-color: #f5f5f5;
overflow: hidden;
} }
/* 患者信息栏样式 */ /* 患者信息栏样式 */
@ -115,6 +112,7 @@ $primary-color: #0877F1;
flex: 1; flex: 1;
box-sizing: border-box; box-sizing: border-box;
overflow-x: hidden; overflow-x: hidden;
min-height: 0;
} }
.chat-content-compressed { .chat-content-compressed {
@ -384,6 +382,7 @@ $primary-color: #0877F1;
position: relative; position: relative;
z-index: 200; z-index: 200;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
flex-shrink: 0;
} }
.input-toolbar { .input-toolbar {

View File

@ -8,7 +8,7 @@
<view class="input-area"> <view class="input-area">
<textarea v-if="!showVoiceInput" class="text-input" v-model="inputText" placeholder="我来说两句..." <textarea v-if="!showVoiceInput" class="text-input" v-model="inputText" placeholder="我来说两句..."
@confirm="sendTextMessage" @focus="handleInputFocus" @input="handleInput" @confirm="sendTextMessage" @focus="handleInputFocus" @input="handleInput"
:auto-height="true" :show-confirm-bar="false" :adjust-position="true" :cursor-spacing="40" /> :auto-height="true" :show-confirm-bar="false" :adjust-position="true" :cursor-spacing="80" />
<input v-else class="voice-input-btn" :class="{ recording: isRecording }" @touchstart="startRecord" <input v-else class="voice-input-btn" :class="{ recording: isRecording }" @touchstart="startRecord"
@touchmove="onRecordTouchMove" @touchend="stopRecord" @touchcancel="cancelRecord" :placeholder="isRecording ? '松开发送' : '按住说话'" disabled> @touchmove="onRecordTouchMove" @touchend="stopRecord" @touchcancel="cancelRecord" :placeholder="isRecording ? '松开发送' : '按住说话'" disabled>
</input> </input>

View File

@ -2735,20 +2735,9 @@ class TimChatManager {
if (!conversationID.startsWith('GROUP')) { if (!conversationID.startsWith('GROUP')) {
formattedConversationID = `GROUP${conversationID}` formattedConversationID = `GROUP${conversationID}`
} }
this.triggerCallback('onConversationListUpdated', {
console.log('📖 标记会话为已读:', formattedConversationID); conversationID: formattedConversationID,
unreadCount: 0
this.tim.setMessageRead({
conversationID: formattedConversationID
}).then(() => {
console.log('✓ 会话已标记为已读:', formattedConversationID);
// 触发会话列表更新回调,通知消息列表页面清空未读数
this.triggerCallback('onConversationListUpdated', {
conversationID: formattedConversationID,
unreadCount: 0
})
}).catch(error => {
console.error('✗ 标记会话已读失败:', error)
}) })
} catch (error) { } catch (error) {
console.error('✗ 标记会话已读异常:', error) console.error('✗ 标记会话已读异常:', error)