降权非主线后台入口
This commit is contained in:
1 parent
3247db7ed1
commit
ddfb8539cb
2 files changed
+199
-8
No files matched your search
@@ -2,6 +2,8 @@ import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import { getAllAdminPages } from '@/constants/admin-sections'
|
||||
import { componentLoaders } from './component-loaders/index.js'
|
||||
|
||||
const ADMIN_DEFAULT_ROUTE = '/global/common'
|
||||
|
||||
function resolveComponent(page) {
|
||||
if (componentLoaders[page.component]) {
|
||||
return componentLoaders[page.component]
|
||||
@@ -23,6 +25,11 @@ function createRouteMeta(page) {
|
||||
section: page.sectionKey || '',
|
||||
desc: page.desc || '',
|
||||
status: page.status || 'available',
|
||||
secondaryEntry: page.secondaryEntry === true,
|
||||
}
|
||||
|
||||
if (page.compatSourceSection) {
|
||||
meta.compatSourceSection = page.compatSourceSection
|
||||
}
|
||||
|
||||
if (page.canonicalDomain) {
|
||||
@@ -51,7 +58,7 @@ function createRouteMeta(page) {
|
||||
}
|
||||
|
||||
const routes = [
|
||||
{ path: '/', redirect: '/global/common' },
|
||||
{ path: '/', redirect: ADMIN_DEFAULT_ROUTE },
|
||||
...getAllAdminPages().map((page) => ({
|
||||
path: page.route,
|
||||
name: page.name,
|
||||
@@ -64,3 +71,4 @@ export default createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user