index.js 522 B

12345678910111213141516171819202122232425262728293031
  1. import { createRouter, createWebHashHistory } from 'vue-router'
  2. const routes = [{
  3. path: '/',
  4. redirect: '/login'
  5. },
  6. {
  7. path: '/init',
  8. name: 'Init',
  9. component: () => import('@/view/init/index.vue')
  10. },
  11. {
  12. path: '/login',
  13. name: 'Login',
  14. component: () => import('@/view/login/index.vue')
  15. },
  16. {
  17. path: '/:catchAll(.*)',
  18. meta: {
  19. closeTab: true,
  20. },
  21. component: () => import('@/view/error/index.vue')
  22. }
  23. ]
  24. const router = createRouter({
  25. history: createWebHashHistory(),
  26. routes,
  27. })
  28. export default router