import { createWebHistory, createWebHashHistory, createMemoryHistory, createRouter, } from "vue-router"; import Login from "../views/index/Login.vue"; import VoyageList from "../views/voyage/voyageList.vue"; const router = createRouter({ history: createWebHashHistory(), routes: [ { path: "/", name: "index", component: () => import("../views/index/Index.vue"), }, { path: "/login", name: "login", meta: { title: "登录", }, component: Login, }, { path: "/voyage/voyageDetail", name: "voyageDetail", meta: { title: "航次详情", code: "VOYAGEDETAIL", }, component: () => import("../views/voyage/voyageDetail.vue"), }, { path: "/voyage/voyageList", name: "voyageList", meta: { title: "航次列表", code: "VOYAGELIST", }, component: VoyageList, }, { path: "/accountManage/subAccountList", name: "subAccountList", meta: { title: "子账户列表", code: "ACCOUNTLIST", }, component: () => import("../views/accountManage/subAccountList.vue"), }, { path: "/agencyManage/agencyCompanyList", name: "agencyCompanyList", meta: { title: "代理公司列表", code: "PROXYLIST", }, component: () => import("../views/agencyManage/agencyCompanyList.vue"), }, { path: "/authManage/roleList", name: "roleList", meta: { title: "角色列表", code: "ROLELIST", }, component: () => import("../views/authManage/roleList.vue"), }, { path: "/authManage/addRole", name: "addRole", meta: { title: "新增角色", code: "ADDUPDATEROLE", }, component: () => import("../views/authManage/addRole.vue"), }, { path: "/cargoManage/cargoList", name: "cargoList", meta: { title: "货种列表", code: "CARGOLIST", }, component: () => import("../views/cargoManage/cargoList.vue"), }, ], }); export const asyncRouterList = [ { path: "/accountManage/subAccountList", name: "subAccountList", meta: { title: "子账户列表", code: "ACCOUNTLIST", }, component: () => import("../views/accountManage/subAccountList.vue"), }, { path: "/agencyManage/agencyCompanyList", name: "agencyCompanyList", meta: { title: "代理公司列表", code: "PROXYLIST", }, component: () => import("../views/agencyManage/agencyCompanyList.vue"), }, { path: "/authManage/roleList", name: "roleList", meta: { title: "角色列表", code: "ROLELIST", }, component: () => import("../views/authManage/roleList.vue"), }, { path: "/authManage/addRole", name: "addRole", meta: { title: "新增角色", code: "ADDUPDATEROLE", }, component: () => import("../views/authManage/addRole.vue"), }, { path: "/cargoManage/cargoList", name: "cargoList", meta: { title: "货种列表", code: "CARGOLIST", }, component: () => import("../views/cargoManage/cargoList.vue"), }, ]; export default router;