You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.8 KiB
77 lines
1.8 KiB
import type { RouteRecordRaw } from 'vue-router';
|
|
import { createRouter,createWebHistory } from 'vue-router';
|
|
import LogPage from '../views/LogPage.vue';
|
|
import Personal from '@/components/Personal.vue';
|
|
import Manager from '@/views/AcountManager.vue';
|
|
import PersonalHome from '@/views/Home.vue';
|
|
import ForumHome from '@/views/ForumHome.vue';
|
|
import Curriculum from '@/views/Curriculum.vue';
|
|
|
|
const routes:Array<RouteRecordRaw> = [
|
|
{
|
|
path: '/',
|
|
redirect: '/log',
|
|
},
|
|
{
|
|
path: '/:pathMatch(.*)*',
|
|
name: 'NotFound',
|
|
component: () => import('@/views/404.vue'),
|
|
},
|
|
{
|
|
path:'/log',
|
|
name: 'LogPage',
|
|
component: LogPage
|
|
},
|
|
{
|
|
path:'/personal',
|
|
name: 'Personal',
|
|
component: Personal,
|
|
children: [
|
|
{
|
|
path:'',
|
|
name:'Home',
|
|
component:PersonalHome,
|
|
},
|
|
{
|
|
path:'manager',
|
|
name: 'Manager',
|
|
component:Manager,
|
|
},
|
|
{
|
|
path:'ai',
|
|
redirect: '/personal',
|
|
},
|
|
{
|
|
path:'curriculum',
|
|
name:'Curriculum',
|
|
component:Curriculum,
|
|
},
|
|
]
|
|
},
|
|
{
|
|
path:'/uniLifeHome',
|
|
name: 'ForumHome',
|
|
component: ForumHome,
|
|
},
|
|
{
|
|
path:'/post/:id',
|
|
name:'PostDetail',
|
|
component: () => import('@/views/PostDetailPage.vue'),
|
|
},
|
|
{
|
|
path: '/postEdit',
|
|
name: 'PostEdit',
|
|
component: () => import('@/views/PostEditView.vue'),
|
|
meta:{
|
|
hideHeader: true,
|
|
}
|
|
}
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
routes
|
|
});
|
|
|
|
export default router;
|