项目初始化
This commit is contained in:
33
web/src/router/static/adminBase.ts
Normal file
33
web/src/router/static/adminBase.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
/**
|
||||
* 后台基础路由路径
|
||||
* 您可以随时于后台->系统配置中修改此值,程序可自动完成代码修改,同时建立对应的API入口和禁止admin应用访问
|
||||
*/
|
||||
export const adminBaseRoutePath = '/admin'
|
||||
|
||||
/*
|
||||
* 后台基础静态路由
|
||||
*/
|
||||
const adminBaseRoute: RouteRecordRaw = {
|
||||
path: adminBaseRoutePath,
|
||||
name: 'admin',
|
||||
component: () => import('/@/layouts/backend/index.vue'),
|
||||
// 直接重定向到 loading 路由
|
||||
redirect: adminBaseRoutePath + '/loading',
|
||||
meta: {
|
||||
title: `pagesTitle.admin`,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'loading/:to?',
|
||||
name: 'adminMainLoading',
|
||||
component: () => import('/@/layouts/common/components/loading.vue'),
|
||||
meta: {
|
||||
title: `pagesTitle.loading`,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default adminBaseRoute
|
||||
32
web/src/router/static/memberCenterBase.ts
Normal file
32
web/src/router/static/memberCenterBase.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
/**
|
||||
* 会员中心基础路由路径
|
||||
*/
|
||||
export const memberCenterBaseRoutePath = '/user'
|
||||
|
||||
/*
|
||||
* 会员中心基础静态路由
|
||||
*/
|
||||
const memberCenterBaseRoute: RouteRecordRaw = {
|
||||
path: memberCenterBaseRoutePath,
|
||||
name: 'user',
|
||||
component: () => import('/@/layouts/frontend/user.vue'),
|
||||
// 重定向到 loading 路由
|
||||
redirect: memberCenterBaseRoutePath + '/loading',
|
||||
meta: {
|
||||
title: `pagesTitle.user`,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'loading/:to?',
|
||||
name: 'userMainLoading',
|
||||
component: () => import('/@/layouts/common/components/loading.vue'),
|
||||
meta: {
|
||||
title: `pagesTitle.loading`,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default memberCenterBaseRoute
|
||||
Reference in New Issue
Block a user