feat(h5): 小程序 embed 模式与全站 ICP 备案页脚

H5 支持 ?mp=1 嵌入微信 WebView;user-h5/admin-h5 底部展示蜀ICP备2025140386号-2 并链至工信部;补充小程序+H5 部署说明。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-25 00:41:14 +08:00
co-authored by Cursor
parent d33a25a663
commit 8d856fb56c
14 changed files with 498 additions and 7 deletions
@@ -0,0 +1,25 @@
<template>
<footer class="icp-footer">
<a class="icp-link" :href="ICP_MIIT_URL" target="_blank" rel="noopener noreferrer">{{ ICP_RECORD }}</a>
</footer>
</template>
<script setup lang="ts">
import { ICP_MIIT_URL, ICP_RECORD } from '@yuxingu/utils'
</script>
<style scoped>
.icp-footer {
text-align: center;
padding: 1rem 0 0.5rem;
}
.icp-link {
font-size: 12px;
line-height: 1.4;
color: var(--muted, #8a7f7b);
text-decoration: none;
}
.icp-link:hover {
color: var(--accent, #e54d42);
}
</style>
+12 -2
View File
@@ -2,6 +2,7 @@
import { onMounted } from 'vue'
import { RouterLink, RouterView, useRouter } from 'vue-router'
import BrandLogo from '@/components/BrandLogo.vue'
import IcpFooter from '@/components/IcpFooter.vue'
import { useAuthStore } from '@/stores/auth'
const auth = useAuthStore()
@@ -55,7 +56,10 @@ async function onLogout() {
</div>
</aside>
<main class="main">
<RouterView />
<div class="main-body">
<RouterView />
</div>
<IcpFooter />
</main>
</div>
</template>
@@ -91,7 +95,13 @@ nav a.router-link-active {
}
.foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.role { font-size: 0.75rem; color: var(--muted); }
.main { padding: 1.5rem 1.75rem; }
.main {
padding: 1.5rem 1.75rem;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.main-body { flex: 1; min-width: 0; }
@media (max-width: 800px) {
.shell { grid-template-columns: 1fr; }
.nav { border-right: 0; border-bottom: 1px solid var(--line); }
+15 -1
View File
@@ -2,6 +2,7 @@
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import BrandLogo from '@/components/BrandLogo.vue'
import IcpFooter from '@/components/IcpFooter.vue'
import { useAuthStore } from '@/stores/auth'
const auth = useAuthStore()
@@ -46,11 +47,24 @@ async function onSubmit() {
{{ loading ? '登录中…' : '登录' }}
</button>
</form>
<IcpFooter />
</div>
</template>
<style scoped>
.wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.wrap {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1.5rem;
}
.wrap :deep(.icp-footer) {
margin-top: auto;
width: 100%;
padding-bottom: 0.25rem;
}
.login { width: min(380px, 100%); text-align: center; }
.login :deep(.field) { text-align: left; }
h1 { margin: 0 0 0.25rem; font-size: 1.45rem; font-family: "Noto Serif SC", "Songti SC", serif; }