From 2f917eed825791644e4fba9ad7cdfc52604b82e0 Mon Sep 17 00:00:00 2001 From: zoujing Date: Thu, 30 Apr 2026 10:13:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E4=BA=86=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ChatMain/ChatMainList/index.vue | 5 +++++ src/pages/Discovery/index.vue | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/ChatMain/ChatMainList/index.vue b/src/pages/ChatMain/ChatMainList/index.vue index 4e22e70..60f2180 100644 --- a/src/pages/ChatMain/ChatMainList/index.vue +++ b/src/pages/ChatMain/ChatMainList/index.vue @@ -873,6 +873,11 @@ const sendMessage = async (message, isInstruct = false) => { await checkToken(); + /// 切换到对话tab + if (tabIndex.value !== 1) { + tabIndex.value = 1; + } + // 检查WebSocket连接状态,如果未连接,尝试重新连接 if (!isWsConnected()) { console.log("WebSocket未连接,尝试重新连接..."); diff --git a/src/pages/Discovery/index.vue b/src/pages/Discovery/index.vue index 00c2f02..7f1e764 100644 --- a/src/pages/Discovery/index.vue +++ b/src/pages/Discovery/index.vue @@ -23,7 +23,6 @@ import { onMounted, ref } from "vue"; import { SEND_MESSAGE_CONTENT_TEXT, SEND_MESSAGE_COMMAND_TYPE, SWITCH_TO_COMPANION_TAB } from "@/constant/constant"; import { navigateTo } from "@/router"; import { getAccessToken } from "@/constant/token"; -import { checkToken } from "@/hooks/useGoLogin"; import FindTabs from "./components/FindTabs/index.vue"; import CardSwiper from "./components/CardSwiper/index.vue"; @@ -122,8 +121,6 @@ const handleQuickQuestionClick = (item) => { }; const handleClick = async (item) => { - await checkToken(); - console.log(`执行点击事件: ${item.jumpType},参数:${JSON.stringify(item.jumpContent)}`); /// 商品 if (item.jumpType === JumpType.commodity) { @@ -133,7 +130,6 @@ const handleClick = async (item) => { } /// 提示词 else if (item.jumpType === JumpType.prompt) { - uni.$emit(SWITCH_TO_COMPANION_TAB); /// 切换到伴游tab uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item.jumpContent); } /// 链接 @@ -145,7 +141,6 @@ const handleClick = async (item) => { } /// 组件指令 else if (item.jumpType === JumpType.command) { - uni.$emit(SWITCH_TO_COMPANION_TAB); /// 切换到伴游tab uni.$emit(SEND_MESSAGE_COMMAND_TYPE, { type: item.jumpContent, title: item.jumpDesc }); } }