From 74f2c0c7f3de951b6c21d2e423da5c7663df6f31 Mon Sep 17 00:00:00 2001 From: Jay <csj123456> Date: 星期二, 24 九月 2024 08:37:39 +0800 Subject: [PATCH] 指标定义 --- src/layout/components/Logo/src/Logo.vue | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/layout/components/Logo/src/Logo.vue b/src/layout/components/Logo/src/Logo.vue index d241130..d5790b0 100644 --- a/src/layout/components/Logo/src/Logo.vue +++ b/src/layout/components/Logo/src/Logo.vue @@ -2,6 +2,7 @@ import { computed, onMounted, ref, unref, watch } from 'vue' import { useAppStore } from '@/store/modules/app' import { useDesign } from '@/hooks/web/useDesign' +import * as authUtil from "@/utils/auth"; defineOptions({ name: 'Logo' }) @@ -13,11 +14,22 @@ const show = ref(true) +const homePath = ref('/index') + const title = computed(() => appStore.getTitle) const layout = computed(() => appStore.getLayout) const collapse = computed(() => appStore.getCollapse) + +let tenantId = authUtil.getTenantId() +console.log(tenantId) +if (tenantId && tenantId === 1) { + homePath.value = '/index' +} else { + homePath.value = '/home2' +} +console.log(homePath.value) onMounted(() => { if (unref(collapse)) show.value = false @@ -64,7 +76,7 @@ layout !== 'classic' ? `${prefixCls}__Top` : '', 'flex !h-[var(--logo-height)] items-center cursor-pointer pl-8px relative decoration-none overflow-hidden' ]" - to="/" + :to="homePath" > <img class="h-[calc(var(--logo-height)-10px)] w-[calc(var(--logo-height)-10px)]" -- Gitblit v1.9.3