Browse Source

feat: 修改京ICP备号

main
betaqi 5 days ago
parent
commit
e5981244da
  1. 15
      layouts/default.vue

15
layouts/default.vue

@ -166,12 +166,11 @@ @@ -166,12 +166,11 @@
format="webp"
/>
<a
href=" "
href="https://beian.miit.gov.cn/"
rel="noreferrer"
target="_blank"
class="hover:no-underline inline-flex cursor-pointer ml-1"
>京公网安备11010802045670号</a
>
>京ICP备{{ icpSuffix }}</a>
</p>
</div>
</div>
@ -187,12 +186,20 @@ const router = useRouter() @@ -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(() => {

Loading…
Cancel
Save