import Main from '@/views/Main.vue'; // 不作为Main组件的子页面展示的页面单独写,如下 export const loginRouter = { path: '/login', name: 'login', meta: { title: '登录' }, component: () => import('@/views/login.vue') }; export const registRouter = { path: '/regist', name: 'regist', meta: { title: '注册' }, component: () => import('@/views/regist.vue') }; export const registResult = { path: '/regist-result', name: 'regist-result', meta: { title: '注册结果' }, component: () => import('@/views/regist-result.vue') }; export const reset = { path: '/reset', name: 'reset', meta: { title: '重置密码' }, component: () => import('@/views/reset.vue') }; export const relateRouter = { path: '/relate', name: 'relate', meta: { title: '绑定账号 ' }, component: () => import('@/views/relate.vue') }; export const authorizeRouter = { path: '/authorize', name: 'authorize', meta: { title: ' ' }, component: () => import('@/views/authorize.vue') }; // export const page404 = { // path: '/*', // name: 'error-404', // meta: { // title: '404-页面不存在' // }, // component: () => import('@/views/error-page/404.vue') // }; export const page403 = { path: '/403', meta: { title: '403-权限不足' }, name: 'error-403', component: () => import('@/views/error-page/403.vue') }; export const page500 = { path: '/500', meta: { title: '500-服务端错误' }, name: 'error-500', component: () => import('@/views/error-page/500.vue') }; export const home2 = { path: '/home2', meta: { title: 'home' }, name: 'home', component: () => import('@/views/sys/user-manage/userManage.vue') }; export const table1 = {path: '/table1', meta: {title: 'table1'}, name: 'table1', component: () => import('@/views/open/table1.vue')}; export const table2 = {path: '/table2', meta: {title: 'table2'}, name: 'table2', component: () => import('@/views/open/table2.vue')}; export const table3 = {path: '/table3', meta: {title: 'table3'}, name: 'table3', component: () => import('@/views/open/table3.vue')}; export const table4 = {path: '/table4', meta: {title: 'table4'}, name: 'table4', component: () => import('@/views/open/table4.vue')}; export const table5 = {path: '/table5', meta: {title: 'table5'}, name: 'table5', component: () => import('@/views/open/table5.vue')}; export const table6 = {path: '/table6', meta: {title: 'table6'}, name: 'table6', component: () => import('@/views/open/table6.vue')}; export const table7 = {path: '/table7', meta: {title: 'table7'}, name: 'table7', component: () => import('@/views/open/table7.vue')}; // 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里 export const otherRouter = { path: '/', name: 'otherRouter', redirect: '/home', component: Main, children: [ { path: 'home', title: { i18n: 'home' }, name: 'home_index', component: () => import('@/views/home/home.vue') }, { path: 'ownspace', title: '个人中心', name: 'ownspace_index', component: () => import('@/views/own-space/own-space.vue') }, { path: 'message', title: '消息中心', name: 'message_index', component: () => import('@/views/message/message.vue') }, { path: 'add', title: '添加', name: 'add', component: () => import('@/views/xboot-vue-template/new-window/add.vue') }, { path: 'edit', title: '编辑', name: 'edit', component: () => import('@/views/xboot-vue-template/new-window/edit.vue') }, { path: 'leave', title: '请假申请', name: 'leave', component: () => import('@/views/activiti/business/leave.vue') }, { path: 'historic-detail', title: '流程进度历史详情', name: 'historic_detail', component: () => import('@/views/activiti/historic-detail/historicDetail.vue') } ] }; export const appRouter = []; // 所有上面定义的路由都要写在下面的routers里 export const routers = [ loginRouter, registRouter, registResult, reset, relateRouter, authorizeRouter, otherRouter, ...appRouter, page500, page403, home2, table1, table2, table3, table4, table5, table6, table7, ];