import { RouteRecordRaw } from "vue-router";

export const commonRoutes: Array<RouteRecordRaw> = [
  { path: "/", redirect: "/home" },

  {
    name: "home",
    path: "/home",
    meta: { title: "首页" },
    component: () => import("@/views/common/home/index.vue"),
  },
  {
    name: "me",
    path: "/me",
    meta: { title: "我" },
    component: () => import("@/views/common/me/index.vue"),
  },
  {
    name: "login",
    path: "/login",
    meta: { title: "登录" },
    component: () => import("@/views/common/login/index.vue"),
  },

  {
    path: "/404",
    name: "notFound",
    meta: {
      title: "404",
    },
    component: () => import("@/views/common/not-found/index.vue"),
  },
  {
    path: "/:pathMatch(.*)*",
    redirect: "/404",
  },
];
