index.ts 637 B

1234567891011121314151617181920212223242526272829
  1. import { createRouter, createWebHashHistory } from "vue-router";
  2. let routes = [
  3. // 首页 -> 展馆列表
  4. {
  5. path: "/",
  6. name: "home",
  7. component: () => import("@/view/home/index.vue"),
  8. },
  9. // 展馆 -> 音频列表
  10. {
  11. path: "/exhibitionList",
  12. name: "exhibitionList",
  13. component: () => import("@/view/exhibitionList/index.vue"),
  14. },
  15. // 展馆 -> 音频详情
  16. {
  17. path: "/audioDetail",
  18. name: "audioDetail",
  19. component: () => import("@/view/audioDetail/index.vue"),
  20. },
  21. ];
  22. // 路由
  23. const router = createRouter({
  24. history: createWebHashHistory(),
  25. routes,
  26. });
  27. // 导出
  28. export default router;