feat(platform-ops): 增加平台运营统计总览页面
This commit is contained in:
@@ -8,7 +8,7 @@ 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'
|
||||
import { ADMIN_DASHBOARD_PATH, PLATFORM_OPS_PATH, isAdminPath } from '@/shared/utils/adminPath'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@@ -48,7 +48,12 @@ async function handleLogin() {
|
||||
)
|
||||
ElMessage.success('后台登录成功')
|
||||
const redirect = typeof route.query.redirect === 'string' ? route.query.redirect : ''
|
||||
await router.push(isAdminPath(redirect) ? redirect : ADMIN_DASHBOARD_PATH)
|
||||
const destination = siteStore.isPlatformOps
|
||||
? PLATFORM_OPS_PATH
|
||||
: isAdminPath(redirect)
|
||||
? redirect
|
||||
: ADMIN_DASHBOARD_PATH
|
||||
await router.push(destination)
|
||||
} catch (error) {
|
||||
ElMessage.error(readError(error, '后台登录失败'))
|
||||
await loadCaptcha()
|
||||
@@ -67,7 +72,9 @@ async function handleLogin() {
|
||||
<div class="admin-login-left">
|
||||
<div class="brand-lockup">
|
||||
<div class="brand-logo">{{ siteStore.brandMark }}</div>
|
||||
<strong>{{ siteStore.siteName }} · 后台管理</strong>
|
||||
<strong
|
||||
>{{ siteStore.siteName }}{{ siteStore.isPlatformOps ? '' : ' · 后台管理' }}</strong
|
||||
>
|
||||
</div>
|
||||
<div class="admin-login-hero">
|
||||
<h2>高效管理<br />从容掌控</h2>
|
||||
@@ -75,7 +82,9 @@ async function handleLogin() {
|
||||
<div class="login-site-scope">
|
||||
<span>当前登录站点</span>
|
||||
<strong>{{ siteStore.siteName }}</strong>
|
||||
<em>{{ siteStore.isTenant ? '经营站点' : '站点后台' }}</em>
|
||||
<em>{{
|
||||
siteStore.isPlatformOps ? '只读统计' : siteStore.isTenant ? '经营站点' : '站点后台'
|
||||
}}</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin-login-footer">
|
||||
|
||||
Reference in New Issue
Block a user