45 lines
755 B
JavaScript
45 lines
755 B
JavaScript
import Vue from 'vue';
|
|
import Router from 'vue-router';
|
|
import UserView from '@/views/User.vue';
|
|
import App from '@/App.vue';
|
|
import AdminView from '@/views/AdminView.vue';
|
|
import HospitalView from '@/views/HospitalView.vue';
|
|
|
|
Vue.use(Router);
|
|
|
|
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
name: 'App',
|
|
component: App,
|
|
children: [
|
|
{
|
|
path: 'user',
|
|
name: 'UserView',
|
|
component: UserView
|
|
},
|
|
{
|
|
path: 'admin',
|
|
name: 'AdminView',
|
|
component: AdminView
|
|
},
|
|
{
|
|
path: 'hospital',
|
|
name: 'HospitalView',
|
|
component: HospitalView
|
|
}
|
|
|
|
]
|
|
}
|
|
|
|
]
|
|
const router = new Router({
|
|
mode: 'history',
|
|
base: process.env.BASE_URL,
|
|
routes
|
|
})
|
|
|
|
|
|
|
|
export default router |