From e5981244dad1b3bb9cb412b080f2869d2721ee2b Mon Sep 17 00:00:00 2001 From: betaqi <3188864257@qq.com> Date: Tue, 22 Jul 2025 10:36:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=BA=ACICP=E5=A4=87?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/default.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/layouts/default.vue b/layouts/default.vue index a07e90e..6ba9ae8 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -166,12 +166,11 @@ format="webp" /> 京公网安备11010802045670号 + >京ICP备{{ icpSuffix }}

@@ -187,12 +186,20 @@ const router = useRouter() const checkScroll = () => { isScrolled.value = window.scrollY > 20 } - +const icpSuffix = ref('') onMounted(() => { if (typeof window !== 'undefined') { checkScroll() window.addEventListener('scroll', checkScroll) } + const hostname = window.location.hostname + if (hostname.endsWith('.com')) { + icpSuffix.value = '2025119652号-2' + } else if (hostname.endsWith('.cn')) { + icpSuffix.value = '2025119652号-1' + } else { + icpSuffix.value = '2025119652号' + } }) onUnmounted(() => {