From aa99655d0c011ef56d3d7cb6016a298f1b1b39d9 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Wed, 27 Sep 2023 19:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC=E6=97=B6?= =?UTF-8?q?=E4=BF=9D=E7=95=99token=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/router.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/src/router.js b/ui/src/router.js index 68cc4a496..e53772178 100644 --- a/ui/src/router.js +++ b/ui/src/router.js @@ -6,4 +6,13 @@ const router = createRouter({ routes }) +router.beforeEach((to, from) => { + if (from.query.token && !to.query.token) { + return { + path: to.path, + query: from.query + } + } +}) + export default router