统一登录成功后进入智能对话页面

This commit is contained in:
kx_guo 2026-09-10 11:43:38 +08:00
parent c502bc17c4
commit 71437dfa25

View File

@ -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)