From bd75a3d5bc206a091dbf469bc7b4c5e4d42928f8 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 30 Jun 2025 18:34:59 +0800 Subject: [PATCH] perf: cas auth (#3436) --- ui/src/router/chat/index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/src/router/chat/index.ts b/ui/src/router/chat/index.ts index 570901b68..52757f40e 100644 --- a/ui/src/router/chat/index.ts +++ b/ui/src/router/chat/index.ts @@ -44,7 +44,7 @@ router.beforeEach( } const p_token = to.query.token if (p_token) { - chatUser.setToken(p_token) + chatUser.setToken(p_token as string) } const token = chatUser.getToken() if (authentication) { @@ -75,7 +75,12 @@ router.beforeEach( } return } - next() + if (p_token) { + next({ ...to, query: {} }) + } else { + next() + } + return } }