index.ts 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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: '/login/sunshineRun', component: () => import('@/views/login/sunshineRun.vue') },
  16. { path: '/train', component: () => import('@/views/train/index.vue') },
  17. { path: '/train/test', component: () => import('@/views/train/test.vue') },
  18. { path: '/train/run', component: () => import('@/views/train/run.vue') },
  19. { path: '/train/multiple', component: () => import('@/views/train/multiple.vue') },
  20. { path: '/train/device', component: () => import('@/views/train/device.vue') },
  21. { path: '/test', component: () => import('@/views/test/index.vue') },
  22. { path: '/set', component: () => import('@/views/set/index.vue') },
  23. { path: '/set/config', component: () => import('@/views/set/config.vue') },
  24. { path: '/set/deploy', component: () => import('@/views/set/deploy.vue') },
  25. { path: '/ranking', component: () => import('@/views/ranking/index.vue') },
  26. { path: '/course', component: () => import('@/views/course/index.vue') },
  27. { path: '/gesture', component: () => import('@/views/gesture/index.vue') },
  28. { path: '/analysis/index', component: () => import('@/views/analysis/index.vue') },
  29. { path: '/analysis/detail', component: () => import('@/views/analysis/detail.vue') },
  30. { path: '/sunshineRun', component: () => import('@/views/sunshineRun/index.vue') },
  31. { path: '/game', component: () => import('@/views/game/index.vue') },
  32. { path: '/game/square', component: () => import('@/views/game/square.vue') },
  33. { path: '/game/fruit', component: () => import('@/views/game/fruit.vue') },
  34. { path: '/game/basketball', component: () => import('@/views/game/basketball.vue') },
  35. { path: '/game/humanBody', component: () => import('@/views/game/humanBody.vue') },
  36. { path: '/score', component: () => import('@/views/score/index.vue') },
  37. ]
  38. }
  39. ]
  40. });
  41. export default router;