From 76ead609d521b498579fcf89f611b99ae4ab7c09 Mon Sep 17 00:00:00 2001 From: zoujing Date: Wed, 4 Feb 2026 11:59:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AD=97=E6=AE=B5=E7=9A=84=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=92=8C=E9=97=AE=E5=8D=B7=E8=B7=B3=E8=BD=AC=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SurveyQuestionnaire/index.vue | 7 ++--- .../components/chat/ChatMainList/index.vue | 6 ++-- .../module/DiscoveryCradContentList/index.vue | 20 ++++++------- .../module/RecommendPostsList/index.vue | 28 ++++++++----------- src/router/index.js | 2 +- 5 files changed, 26 insertions(+), 37 deletions(-) diff --git a/src/components/SurveyQuestionnaire/index.vue b/src/components/SurveyQuestionnaire/index.vue index d6f11e2..2a9eaa9 100644 --- a/src/components/SurveyQuestionnaire/index.vue +++ b/src/components/SurveyQuestionnaire/index.vue @@ -21,6 +21,7 @@ diff --git a/src/pages/index/components/chat/ChatMainList/index.vue b/src/pages/index/components/chat/ChatMainList/index.vue index 1d073a1..b709ee6 100644 --- a/src/pages/index/components/chat/ChatMainList/index.vue +++ b/src/pages/index/components/chat/ChatMainList/index.vue @@ -148,7 +148,7 @@ const mainPageDataModel = ref({}); // 会话进行中标志 const isSessionActive = ref(false); /// 指令 -let commonType = ""; +let messageCommonType = ""; // WebSocket 相关 let webSocketManager = null; @@ -238,7 +238,7 @@ const handleReplyText = (text) => { const handleReplyInstruct = async (item) => { await checkToken(); - commonType = item.type; + messageCommonType = item.type; // 重置消息状态,准备接收新的AI回复 resetMessageState(); sendMessage(item.title, true); @@ -734,7 +734,7 @@ const sendChat = async (message, isInstruct = false) => { } const messageType = isInstruct ? 1 : 0; - const messageContent = isInstruct ? commonType : message; + const messageContent = isInstruct ? messageCommonType : message; // 生成 messageId 并保存到当前会话变量(stopRequest 可能使用) currentSessionMessageId = IdUtils.generateMessageId(); diff --git a/src/pages/index/components/module/DiscoveryCradContentList/index.vue b/src/pages/index/components/module/DiscoveryCradContentList/index.vue index 3484147..aad3b09 100644 --- a/src/pages/index/components/module/DiscoveryCradContentList/index.vue +++ b/src/pages/index/components/module/DiscoveryCradContentList/index.vue @@ -2,16 +2,9 @@ - + - + {{ item.topic }} @@ -20,7 +13,7 @@ diff --git a/src/pages/index/components/module/RecommendPostsList/index.vue b/src/pages/index/components/module/RecommendPostsList/index.vue index 2081ca7..2ddb1fe 100644 --- a/src/pages/index/components/module/RecommendPostsList/index.vue +++ b/src/pages/index/components/module/RecommendPostsList/index.vue @@ -3,29 +3,18 @@ - + - + - + {{ item.topic }} - - {{ item.userInputContent }} - @@ -34,7 +23,7 @@ diff --git a/src/router/index.js b/src/router/index.js index 53d3f52..383a3a2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,7 +6,7 @@ export function navigateTo(url, args) { // 如果有额外参数,拼接到URL后面 const paramString = objectToUrlParams(args); if (paramString) { - if (targetUrl.contains("?")) { + if (typeof targetUrl === "string" && targetUrl.includes("?")) { targetUrl += "&"; } else { targetUrl += "?";