From 71437dfa250c0fcf8fe159a95360421a1708b7f8 Mon Sep 17 00:00:00 2001 From: kx_guo Date: Thu, 10 Sep 2026 11:43:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E7=99=BB=E5=BD=95=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E5=90=8E=E8=BF=9B=E5=85=A5=E6=99=BA=E8=83=BD=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/LoginPage.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pages/LoginPage.vue b/src/pages/LoginPage.vue index a433943..48f7835 100644 --- a/src/pages/LoginPage.vue +++ b/src/pages/LoginPage.vue @@ -7,24 +7,20 @@ import { Smartphone, } from "@lucide/vue"; import { computed, ref } from "vue"; -import { useRoute, useRouter } from "vue-router"; +import { useRouter } from "vue-router"; import { useAuthStore } from "@/stores/auth.store"; const auth = useAuthStore(); -const route = useRoute(); const router = useRouter(); const mode = ref<"password" | "dingtalk">("password"); const useDevelopmentLogin = ref(true); const username = ref("local-admin"); const password = ref("risk-admin-2026"); -const redirectPath = computed(() => { - const redirect = route.query.redirect; - return typeof redirect === "string" && redirect.startsWith("/") - ? redirect - : "/assessment"; -}); +// 登录后的统一落点是智能对话页,避免从其他受保护页面跳转到登录后 +// 又回到原页面,保证用户进入系统后先看到对话工作台。 +const redirectPath = computed(() => "/assessment"); async function submitPassword() { if (!username.value.trim() || password.value.length < 8 || auth.loading)