import { RouteRecordRaw } from "vue-router";

const Layout = () => import("@/layout/index.vue");

const constantRoutes: RouteRecordRaw[] = [
  {
    path: "/redirect",
    component: Layout,
    meta: { hidden: true },
    children: [
      {
        path: "/redirect/:path(.*)",
        component: () => import("@/views/redirect/index.vue"),
      },
    ],
  },

  {
    path: "/login",
    component: () => import("@/views/login/index.vue"),
    meta: { hidden: true },
  },
  {
    path: "/",
    name: "/",
    meta: { hidden: true },
    component: Layout,
    redirect: "/statistic",
    children: [
      {
        path: "main",
        component: () => import("@/views/statistic/statistic/index.vue"),
        name: "StatisticMain",
        meta: { hidden: true },
      },
    ],
  },

  {
    path: "/:pathMatch(.*)*", // 必备
    meta: { hidden: true },
    component: () => import("@/views/error-page/404.vue"),
  },
];
export default constantRoutes;
