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)