From 573b54e511bc3f72844a8ba24a6f4bd494c97acc Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 18 Nov 2024 11:54:17 +0700 Subject: [PATCH] add go to landing page --- src/views/MainLayout.vue | 120 ++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 59 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 07fc8edbf..5665fc30f 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -21,10 +21,13 @@ import { useroleUserDataStore } from "@/stores/roleUser"; import LoginLinkage from "@/components/LoginLinkage.vue"; -const { setVerticalScrollPosition, getVerticalScrollPosition } = scroll; +// landing page config url +const configParam = { + landingPageUrl: import.meta.env.VITE_URL_SSO, +}; +const { setVerticalScrollPosition } = scroll; const store = useDataStore(); const route = useRoute(); -const router = useRouter(); const link = ref(""); const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง const storeMenu = useMenuDataStore(); @@ -40,7 +43,6 @@ const { const DataStore = useroleUserDataStore(); const { fetchroleUser } = DataStore; -const id = ref(""); const $q = useQuasar(); const { tabData, loader } = storeToRefs(store); const { changeTab } = store; @@ -78,6 +80,17 @@ const options = ref([ ]); const modalLoginLinkage = ref(false); //เข้าสู่ระบบ Linkage Center +// landing page redirect +const landingPageUrl = () => { + if (window.location.hostname === "bmasso.bma.go.th") { + return `${configParam.landingPageUrl}/landing?mode=dev`; + } else if (window.location.hostname === "bma-ehr.frappet.com") { + return `${configParam.landingPageUrl}/landing?mode=prod`; + } else { + return `${configParam.landingPageUrl}/landing?mode=dev`; + } +}; + async function fetchmsgNoread() { await http .get(config.API.msgNoread()) @@ -726,74 +739,63 @@ async function fetchPermissionsSys() {
{{ fullname }}
-
-
- -
-
- -
-
- - - +
-
-
+
+ + + - {{ - op.label - }} + + Landing Page + + + + + + + + + เข้าสู่ระบบ Linkage Center + + + + + + + + + ออกจากระบบ +
-
--> +