feat(admin): 增加站点后台标识与本站统计口径

This commit is contained in:
yml
2026-11-15 19:33:50 +08:00
parent 219ff13c11
commit 609264919d
5 changed files with 235 additions and 17 deletions
@@ -7,11 +7,13 @@ import { useRoute, useRouter } from 'vue-router'
import { fetchAdminCaptcha, type AdminCaptcha } from '@/features/admin'
import { useAdminSessionStore } from '@/stores/adminSession'
import { useDistributionSiteStore } from '@/stores/distributionSite'
import { ADMIN_DASHBOARD_PATH, isAdminPath } from '@/shared/utils/adminPath'
const router = useRouter()
const route = useRoute()
const adminSession = useAdminSessionStore()
const siteStore = useDistributionSiteStore()
const loading = ref(false)
const captchaLoading = ref(false)
const captcha = ref<AdminCaptcha | null>(null)
@@ -64,12 +66,17 @@ async function handleLogin() {
<div class="admin-login-card">
<div class="admin-login-left">
<div class="brand-lockup">
<div class="brand-logo">H</div>
<strong>大锤商行 - 后台管理</strong>
<div class="brand-logo">{{ siteStore.brandMark }}</div>
<strong>{{ siteStore.siteName }} · 后台管理</strong>
</div>
<div class="admin-login-hero">
<h2>高效管理<br />从容掌控</h2>
<p>统一的后台管理系统,助您轻松处理订单、用户与运营数据。</p>
<div class="login-site-scope">
<span>当前登录站点</span>
<strong>{{ siteStore.siteName }}</strong>
<em>{{ siteStore.isTenant ? '经营站点' : '站点后台' }}</em>
</div>
</div>
<div class="admin-login-footer">
<span>© 哈夫币租号平台</span>
@@ -243,6 +250,45 @@ async function handleLogin() {
max-width: 320px;
}
.login-site-scope {
display: flex;
align-items: center;
gap: 8px;
width: fit-content;
max-width: 100%;
margin-top: 20px;
padding: 8px 11px;
border: 1px solid rgba(148, 163, 184, 0.24);
border-radius: 8px;
background: rgba(15, 23, 42, 0.38);
}
.login-site-scope span {
color: #94a3b8;
font-size: 11px;
white-space: nowrap;
}
.login-site-scope strong {
min-width: 0;
overflow: hidden;
color: #f8fafc;
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.login-site-scope em {
flex: none;
padding: 1px 6px;
border-radius: 999px;
background: rgba(37, 99, 235, 0.2);
color: #93c5fd;
font-size: 10px;
font-style: normal;
font-weight: 700;
}
.admin-login-footer span {
color: #475569;
font-size: 12px;