From e650cd4ca7f1d6b69e61cca49699f44edc0bb6be Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期五, 20 九月 2024 16:56:32 +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