feat:更新路由模块
This commit is contained in:
@@ -13,7 +13,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location /blog-api/ {
|
location /blog-api/ {
|
||||||
proxy_pass http://127.0.0.1:8082/;
|
proxy_pass http://host.docker.internal:8082/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
|||||||
@@ -1,7 +1,50 @@
|
|||||||
import BlogLayout from '@/layout/index.vue'
|
import BlogLayout from '@/layout/index.vue'
|
||||||
import { getRoutersByModules } from 'vue3-common/utils/routerUtil'
|
import { RouteRecordRaw } from 'vue-router'
|
||||||
import { blogMeta } from '@/views/meta'
|
|
||||||
|
|
||||||
const blogRoutes = getRoutersByModules(import.meta.glob('@/views/**/*.vue'), BlogLayout, blogMeta)
|
const blogRoutes: RouteRecordRaw[] = [
|
||||||
|
{
|
||||||
|
path: '/overview',
|
||||||
|
redirect: '/overview/index',
|
||||||
|
component: BlogLayout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/overview/index',
|
||||||
|
component: () => import('@/views/overview.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/overview/detail:id',
|
||||||
|
name: 'DetailId',
|
||||||
|
component: () => import('@/views/detail[id].vue')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/category',
|
||||||
|
redirect: '/category/index',
|
||||||
|
component: BlogLayout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/category/index',
|
||||||
|
component: () => import('@/views/category.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/category:name',
|
||||||
|
name: 'CategoryName',
|
||||||
|
component: () => import('@/views/category[name].vue')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/archive',
|
||||||
|
redirect: '/archive/index',
|
||||||
|
component: BlogLayout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/archive/index',
|
||||||
|
component: () => import('@/views/archive.vue')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
export default blogRoutes
|
export default blogRoutes
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
import { IRouteMetaConfig } from 'vue3-common/types'
|
|
||||||
|
|
||||||
export const blogMeta: IRouteMetaConfig = {
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user