diff --git a/.env.development b/.env.development index 255b496..2d56c39 100644 --- a/.env.development +++ b/.env.development @@ -3,7 +3,7 @@ MP_IMAGE_URL=https://patient.youcan365.com MP_CACHE_PREFIX=development MP_WX_APP_ID=wx1d8337a40c11d66c MP_CORP_ID=wwe3fb2faa52cf9dfb -MP_TIM_SDK_APP_ID=1600123876 +MP_TIM_SDK_APP_ID=1600126296 MP_INVITE_TEAMMATE_QRCODE=https://patient.youcan365.com/invite-teammate MP_INVITE_PATIENT_QRCODE=https://patient.youcan365.com/invite-patient MP_PATIENT_PAGE_BASE_URL= 'https://www.youcan365.com/patientDeploy/#/' diff --git a/.env.localhost b/.env.localhost index 25cc623..8a87a34 100644 --- a/.env.localhost +++ b/.env.localhost @@ -3,7 +3,7 @@ MP_IMAGE_URL=https://patient.youcan365.com MP_CACHE_PREFIX=development MP_WX_APP_ID=wx1d8337a40c11d66c MP_CORP_ID=wwe3fb2faa52cf9dfb -MP_TIM_SDK_APP_ID=1600123876 +MP_TIM_SDK_APP_ID=1600126296 MP_INVITE_TEAMMATE_QRCODE=https://patient.youcan365.com/invite-teammate MP_INVITE_PATIENT_QRCODE=https://patient.youcan365.com/invite-patient MP_PATIENT_PAGE_BASE_URL= 'https://www.youcan365.com/patientDeploy/#/' diff --git a/App.vue b/App.vue index 621260a..07beaf8 100644 --- a/App.vue +++ b/App.vue @@ -1,424 +1,430 @@ - - - + + + \ No newline at end of file diff --git a/pages/home/message-home.vue b/pages/home/message-home.vue index 5270017..955b46d 100644 --- a/pages/home/message-home.vue +++ b/pages/home/message-home.vue @@ -368,22 +368,6 @@ const loadConversationList = async () => { } } catch (error) { console.error("加载会话列表失败:", error); - - // 如果是超时或连接错误,提示用户重试 - if ( - error.message && - (error.message.includes("超时") || error.message.includes("连接")) - ) { - uni.showToast({ - title: "网络连接不稳定,请重试", - icon: "none", - }); - } else { - uni.showToast({ - title: error.message || "加载失败,请重试", - icon: "none", - }); - } } finally { loading.value = false; } diff --git a/pages/message/index.vue b/pages/message/index.vue index 48ec97a..d022130 100644 --- a/pages/message/index.vue +++ b/pages/message/index.vue @@ -245,11 +245,16 @@ async function tryConsumePendingFollowUpSend() { const currentGroupId = normalizeGroupId(groupId.value || ""); // 必须匹配当前会话,才允许发送 - if (!payloadConversationID || payloadConversationID !== currentConversationID) return; - if (payloadGroupId && currentGroupId && payloadGroupId !== currentGroupId) return; + if (!payloadConversationID || payloadConversationID !== currentConversationID) + return; + if (payloadGroupId && currentGroupId && payloadGroupId !== currentGroupId) + return; const messages = Array.isArray(payload.messages) ? payload.messages : []; - const context = payload.context && typeof payload.context === "object" ? payload.context : {}; + const context = + payload.context && typeof payload.context === "object" + ? payload.context + : {}; if (!messages.length) { uni.removeStorageSync(PENDING_FOLLOWUP_SEND_STORAGE_KEY); return; @@ -438,7 +443,9 @@ onLoad((options) => { }; const rawGroupId = decodeQueryValue(options.groupID || ""); - groupId.value = rawGroupId.startsWith("GROUP") ? rawGroupId.replace(/^GROUP/, "") : rawGroupId; + groupId.value = rawGroupId.startsWith("GROUP") + ? rawGroupId.replace(/^GROUP/, "") + : rawGroupId; messageList.value = []; isLoading.value = false; if (options.conversationID) { @@ -872,13 +879,17 @@ onShow(() => { checkLoginAndInitTIM(); } else if (timChatManager.tim && !timChatManager.isLoggedIn) { timChatManager.ensureIMConnection(); - } else if (timChatManager.tim && timChatManager.isLoggedIn && chatInfo.value.conversationID) { + } else if ( + timChatManager.tim && + timChatManager.isLoggedIn && + chatInfo.value.conversationID + ) { // 页面从后台返回时,重新加载消息列表 console.log("页面从后台返回,重新加载消息列表"); messageList.value = []; isCompleted.value = false; lastFirstMessageId.value = ""; - loadMessageList(); + // loadMessageList(); } startIMMonitoring(30000);