import {
  createWebHistory,
  createWebHashHistory,
  createMemoryHistory,
  createRouter,
} from "vue-router";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      name: "index",
      component: () => import("../views/index/Index.vue"),
    },
    {
      path: "/login",
      name: "login",
      meta: {
        title: "登录",
      },
      component: () => import("../views/index/Login.vue"),
    },
    {
      path: "/voyage/voyageAdd",
      name: "voyageAdd",
      meta: {
        title: "添加航次",
      },
      component: () => import("../views/voyage/voyageAdd.vue"),
    },
    {
      path: "/voyage/voyageDetail",
      name: "voyageDetail",
      meta: {
        title: "航次详情",
      },
      component: () => import("../views/voyage/voyageDetail.vue"),
    },

    {
      path: "/voyage/voyageList",
      name: "voyageList",
      meta: {
        title: "航次列表",
      },
      component: () => import("../views/voyage/voyageList.vue"),
    },
  ],
});

export default router;
