constant.ts 764 B

12345678910111213141516171819202122232425262728293031323334
  1. import { RouteRecordRaw } from "vue-router";
  2. const Layout = () => import("@/layout/index.vue");
  3. const constantRoutes: RouteRecordRaw[] = [
  4. {
  5. path: "/redirect",
  6. component: Layout,
  7. meta: { hidden: true },
  8. children: [
  9. {
  10. path: "/redirect/:path(.*)",
  11. component: () => import("@/views/redirect/index.vue"),
  12. },
  13. ],
  14. },
  15. {
  16. path: "/login",
  17. component: () => import("@/views/login/index.vue"),
  18. meta: { hidden: true },
  19. },
  20. {
  21. path: "/client-traceability/:id",
  22. component: () => import("@/views/traceability/index.vue"),
  23. name: "client-traceability",
  24. },
  25. {
  26. path: "/:pathMatch(.*)*", // 必备
  27. component: () => import("@/views/error-page/404.vue"),
  28. },
  29. ];
  30. export default constantRoutes;