index.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { createRouter, createWebHashHistory } from 'vue-router';
  2. import Layout from '@/layout/index.vue';
  3. const router = createRouter({
  4. history: createWebHashHistory(),
  5. routes: [
  6. {
  7. path: '',
  8. component: Layout,
  9. redirect: '/home',
  10. children: [
  11. { path: '/home', component: () => import('@/views/home/index.vue') },
  12. { path: '/login', component: () => import('@/views/login/index.vue') },
  13. { path: '/login/qrcode', component: () => import('@/views/login/qrcode.vue') },
  14. { path: '/login/mobile', component: () => import('@/views/login/mobile.vue') },
  15. { path: '/train', component: () => import('@/views/train/index.vue') },
  16. { path: '/train/test', component: () => import('@/views/train/test.vue') },
  17. { path: '/train/run', component: () => import('@/views/train/run.vue') },
  18. { path: '/train/multiple', component: () => import('@/views/train/multiple.vue') },
  19. { path: '/test', component: () => import('@/views/test/index.vue') },
  20. { path: '/set', component: () => import('@/views/set/index.vue') },
  21. { path: '/set/config', component: () => import('@/views/set/config.vue') },
  22. { path: '/ranking', component: () => import('@/views/ranking/index.vue') },
  23. { path: '/course', component: () => import('@/views/course/index.vue') },
  24. { path: '/gesture', component: () => import('@/views/gesture/index.vue') },
  25. { path: '/analysis/index', component: () => import('@/views/analysis/index.vue') },
  26. { path: '/analysis/detail', component: () => import('@/views/analysis/detail.vue') }
  27. ]
  28. }
  29. ]
  30. });
  31. export default router;