no message
This commit is contained in:
parent
d74c06325d
commit
a2d2427eb7
@ -366,10 +366,8 @@ $primary-color: #0877F1;
|
|||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
padding: 0 46rpx;
|
padding: 0 46rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.voice-input-btn {
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
}
|
}
|
||||||
@ -933,7 +931,16 @@ $primary-color: #0877F1;
|
|||||||
.text-input::-moz-placeholder,
|
.text-input::-moz-placeholder,
|
||||||
.text-input:-ms-input-placeholder,
|
.text-input:-ms-input-placeholder,
|
||||||
.text-input::placeholder {
|
.text-input::placeholder {
|
||||||
line-height: 96rpx;
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.voice-input-btn::-webkit-input-placeholder,
|
||||||
|
.voice-input-btn:-moz-placeholder,
|
||||||
|
.voice-input-btn::-moz-placeholder,
|
||||||
|
.voice-input-btn:-ms-input-placeholder,
|
||||||
|
.voice-input-btn::placeholder {
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 时间分割线 */
|
/* 时间分割线 */
|
||||||
|
|||||||
@ -291,12 +291,6 @@ function handleSystemMessageReceived(message) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否有待接诊的系统消息
|
|
||||||
function checkConsultPendingStatus() {
|
|
||||||
// 直接获取最新的订单状态
|
|
||||||
fetchGroupOrderStatus();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取消息气泡样式类
|
// 获取消息气泡样式类
|
||||||
function getBubbleClass(message) {
|
function getBubbleClass(message) {
|
||||||
// 图片消息不需要气泡背景
|
// 图片消息不需要气泡背景
|
||||||
@ -393,27 +387,23 @@ const initTIMCallbacks = async () => {
|
|||||||
handleSystemMessageReceived(message);
|
handleSystemMessageReceived(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否有待接诊的系统消息
|
|
||||||
checkConsultPendingStatus();
|
|
||||||
|
|
||||||
// 立即滚动到底部,不使用延迟
|
// 立即滚动到底部,不使用延迟
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
scrollToBottom(true);
|
scrollToBottom(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 立即标记会话为已读,确保未读数为0
|
// 立即标记会话为已读,确保未读数为0
|
||||||
if (timChatManager.tim && timChatManager.isLoggedIn && chatInfo.value.conversationID) {
|
if (
|
||||||
|
timChatManager.tim &&
|
||||||
|
timChatManager.isLoggedIn &&
|
||||||
|
chatInfo.value.conversationID
|
||||||
|
) {
|
||||||
timChatManager.tim
|
timChatManager.tim
|
||||||
.setMessageRead({
|
.setMessageRead({
|
||||||
conversationID: chatInfo.value.conversationID,
|
conversationID: chatInfo.value.conversationID,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log("✓ 收到新消息后已标记为已读");
|
console.log("✓ 收到新消息后已标记为已读");
|
||||||
// 触发会话列表更新,确保未读数为0
|
|
||||||
timChatManager.triggerCallback('onConversationListUpdated', {
|
|
||||||
conversationID: chatInfo.value.conversationID,
|
|
||||||
unreadCount: 0
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("✗ 标记已读失败:", error);
|
console.error("✗ 标记已读失败:", error);
|
||||||
@ -473,9 +463,6 @@ const initTIMCallbacks = async () => {
|
|||||||
isCompleted.value = data.isCompleted || false;
|
isCompleted.value = data.isCompleted || false;
|
||||||
isLoadingMore.value = false;
|
isLoadingMore.value = false;
|
||||||
|
|
||||||
// 检查是否有待接诊的系统消息
|
|
||||||
checkConsultPendingStatus();
|
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (data.isRefresh) {
|
if (data.isRefresh) {
|
||||||
console.log("后台刷新完成,保持当前滚动位置");
|
console.log("后台刷新完成,保持当前滚动位置");
|
||||||
@ -570,11 +557,6 @@ const loadMessageList = async () => {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log("✓ 会话已标记为已读:", chatInfo.value.conversationID);
|
console.log("✓ 会话已标记为已读:", chatInfo.value.conversationID);
|
||||||
// 触发会话列表更新回调,通知消息列表页面清空未读数
|
|
||||||
timChatManager.triggerCallback('onConversationListUpdated', {
|
|
||||||
conversationID: chatInfo.value.conversationID,
|
|
||||||
unreadCount: 0
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("✗ 标记会话已读失败:", error);
|
console.error("✗ 标记会话已读失败:", error);
|
||||||
@ -731,6 +713,9 @@ onShow(() => {
|
|||||||
// 页面隐藏
|
// 页面隐藏
|
||||||
onHide(() => {
|
onHide(() => {
|
||||||
stopIMMonitoring();
|
stopIMMonitoring();
|
||||||
|
// 清空当前会话ID,避免离开页面后收到的消息被错误标记为已读
|
||||||
|
timChatManager.currentConversationID = null;
|
||||||
|
console.log("✓ 页面隐藏,已清空当前会话ID");
|
||||||
});
|
});
|
||||||
|
|
||||||
// 处理取消申请
|
// 处理取消申请
|
||||||
|
|||||||
@ -46,7 +46,7 @@ export async function mergeConversationWithGroupDetails(conversationList, option
|
|||||||
...options // 支持传入额外的查询参数(corpId, teamId, keyword等)
|
...options // 支持传入额外的查询参数(corpId, teamId, keyword等)
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await api('getGroupList', requestData)
|
const response = await api('getGroupList', requestData, false)
|
||||||
|
|
||||||
// 4. 检查响应
|
// 4. 检查响应
|
||||||
if (!response || !response.success) {
|
if (!response || !response.success) {
|
||||||
|
|||||||
@ -1488,8 +1488,7 @@ class TimChatManager {
|
|||||||
|
|
||||||
this.markConversationAsRead(conversationID)
|
this.markConversationAsRead(conversationID)
|
||||||
|
|
||||||
// 首先从本地接口加载聊天记录
|
|
||||||
console.log(" 开始从本地接口加载聊天记录,groupID:", actualGroupID)
|
|
||||||
await this.loadMessagesFromLocalAPI(actualGroupID, count)
|
await this.loadMessagesFromLocalAPI(actualGroupID, count)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user