2018-11-13 11:33:18 +00:00
|
|
|
import Home from "./pages/Home.vue";
|
|
|
|
import ProgramPage from "./pages/ProgramPage.vue";
|
2018-11-22 06:52:20 +00:00
|
|
|
import ContentPage from "./pages/ContentPage.vue";
|
2018-11-14 08:53:06 +00:00
|
|
|
import ListPage from "./pages/ListPage.vue";
|
2018-11-09 06:17:09 +00:00
|
|
|
|
|
|
|
const routes = [
|
2018-11-13 11:33:18 +00:00
|
|
|
{name: 'home', path: '', component: Home},
|
|
|
|
{name: 'program', path: '/Program/:program_name', component: ProgramPage, props: true},
|
2018-11-22 06:52:20 +00:00
|
|
|
{name: 'content', path: '/Program/:program_name/:course/:type/:content', component: ContentPage, props: true},
|
2018-11-14 08:53:06 +00:00
|
|
|
{name: 'list', path: '/List/:master', component: ListPage, props: true},
|
|
|
|
{
|
|
|
|
name: 'signup',
|
|
|
|
path: '/Signup',
|
|
|
|
beforeEnter(to, from, next) {
|
|
|
|
window.location = window.location.origin.toString() +'/login#signup'
|
|
|
|
},
|
|
|
|
component: ListPage,
|
|
|
|
props: true
|
|
|
|
},
|
2018-11-09 06:17:09 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
export default routes;
|