2025-01-05 11:41:11 +08:00
|
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
|
|
routes: [
|
|
|
|
// {
|
|
|
|
// path: '/',
|
|
|
|
// name: 'home',
|
|
|
|
// component: HomeView,
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: '/about',
|
|
|
|
// name: 'about',
|
|
|
|
// // route level code-splitting
|
|
|
|
// // this generates a separate chunk (About.[hash].js) for this route
|
|
|
|
// // which is lazy-loaded when the route is visited.
|
|
|
|
// component: () => import('../views/AboutView.vue'),
|
|
|
|
// },
|
2025-01-05 15:09:34 +08:00
|
|
|
{
|
|
|
|
path: '/login',
|
|
|
|
name: 'login',
|
|
|
|
component: () => import('../views/common/LoginPage.vue'),
|
|
|
|
},
|
2025-01-05 18:14:52 +08:00
|
|
|
// 后台管理
|
|
|
|
{
|
|
|
|
path: '/backend',
|
|
|
|
name: 'backend',
|
|
|
|
component: () => import('../views/backend/BackendLayout.vue'),
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'blog',
|
|
|
|
name: 'backend_blog_list',
|
|
|
|
component: () => import('../views/backend/blog/ListPage.vue'),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2025-01-05 11:41:11 +08:00
|
|
|
],
|
|
|
|
})
|
|
|
|
|
|
|
|
export default router
|