From c911bc8194829154d18a24f967b78ef1ab549bfa Mon Sep 17 00:00:00 2001 From: gxwebsoft Date: Fri, 15 Mar 2024 13:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=9F=E5=90=8D=E8=A7=A3=E6=9E=90=E6=8E=92?= =?UTF-8?q?=E9=99=A4ip=E5=9C=B0=E5=9D=80=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/domain.ts | 5 +++-- src/views/index/index.vue | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/utils/domain.ts b/src/utils/domain.ts index 25547c9..dcad562 100644 --- a/src/utils/domain.ts +++ b/src/utils/domain.ts @@ -50,8 +50,9 @@ export function getSubDomainPath(): string { // 域名的第一部分 export function getDomainPart1(): any { const split = getHost(); - if (isNumber(split[0])) { - return split[0]; + const tenantId = split[0]; + if (isNumber(tenantId) && tenantId > 10000){ + return tenantId; } return undefined; } diff --git a/src/views/index/index.vue b/src/views/index/index.vue index ad8dd73..a25ad0e 100644 --- a/src/views/index/index.vue +++ b/src/views/index/index.vue @@ -15,7 +15,16 @@ - + +
+
+ +
+
+
+
+
+
Topics of interest include, but are not limited to, the following
@@ -177,7 +186,7 @@
@@ -199,6 +208,9 @@ import {useTenantStore} from "@/store/modules/tenant"; import {useThemeStore} from "@/store/modules/theme"; + import {listArticle} from "@/api/cms/article"; + import {Article} from "@/api/cms/article/model"; + import {ref} from "vue"; const themeStore = useThemeStore(); @@ -206,6 +218,12 @@ const tenantStore = useTenantStore(); const { siteInfo } = storeToRefs(tenantStore); + + const article159 = ref(); + + listArticle({categoryId: 159,limit: 4}).then(data => { + article159.value = data + })