From 191d2394c5a201e740925c38f3b9680c152fb2a3 Mon Sep 17 00:00:00 2001 From: zoujing Date: Tue, 16 Sep 2025 15:53:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=91=E6=B6=88=E6=81=AF=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E7=8A=B6=E6=80=81=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chat/ChatMainList.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/chat/ChatMainList.vue b/pages/chat/ChatMainList.vue index 334d918..5818c94 100644 --- a/pages/chat/ChatMainList.vue +++ b/pages/chat/ChatMainList.vue @@ -609,6 +609,12 @@ const initData = () => { const sendMessage = (message, isInstruct = false) => { console.log("发送的消息:", message); + if (!appStore.hasToken) { + console.log("没有token,跳转到登录页"); + goLogin(); + return; + } + if (!webSocketConnectStatus) { uni.showToast({ title: "当前网络异常,请稍后重试", @@ -617,12 +623,6 @@ const sendMessage = (message, isInstruct = false) => { return; } - if (!appStore.hasToken) { - console.log("没有token,跳转到登录页"); - goLogin(); - return; - } - if (isSessionActive.value) { uni.showToast({ title: "请等待当前回复完成",