diff --git a/src/views/home.vue b/src/views/home.vue index f6083b7..cfdda87 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -86,7 +86,7 @@ async function getName() { * @param sys ระบบที่ต้องการเข้าถึง * @param url ลิงค์ของระบบที่ต้องการเข้าถึง */ -async function goPage(sys: string, url: string) { +async function goPage(sys: string, url: string, auto: boolean = false) { const token = await getCookie(cookieTokenName); const redirectUrl = (route.query.redirectUrl as string) ?? ""; // new @@ -124,6 +124,9 @@ async function goPage(sys: string, url: string) { } } else { // alert("คุณไม่มีสิทธิ์เข้าใช้งานระบบนี้"); + if (auto) { + return (window.location.href = `${window.location.origin}${window.location.pathname}`); + } $q.dialog({ component: CustomComponent, componentProps: { @@ -236,7 +239,8 @@ onMounted(async () => { ? urlMgt : systemkey === "admin" ? urlAdmin - : "" + : "", + true ); } }