12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import Vue from 'vue'
- import VueRouter from 'vue-router'
- import index from '../pages/index.vue'
- const getComponent = (component, dir) => () => import(`.././pages` + (dir ? `/${dir}` : '') + `/${component}.vue`);
- Vue.use(VueRouter)
- const routes = [
- {
- path: '/',
- name: 'index',
- component: index
- },
- {
- path: '/personCenter',
- name: 'personCenter',
- component: getComponent('personCenter')
- },
- {
- path: '/infoType',
- name: 'infoType',
- component: getComponent('infoType')
- },
- {
- path: '/myActives',
- name: 'myActives',
- component: getComponent('myActives')
- },
- {
- path: '/share',
- name: 'share',
- component: getComponent('share')
- },
- {
- path: '/activeDetails',
- name: 'activeDetails',
- component: getComponent('activeDetails')
- },
- {
- path: '/registrationSuccess',
- name: 'registrationSuccess',
- component: getComponent('registrationSuccess')
- },
- {
- path: '/onSiteActivity',
- name: 'onSiteActivity',
- component: getComponent('onSiteActivity')
- },
- {
- path: '/infoDetails',
- name: 'infoDetails',
- component: getComponent('infoDetails')
- }
- //
- ]
- const router = new VueRouter({
- routes
- })
- export default router
|