import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

import routerList from "./list";

const routes = [
  {
    path: "/",
    redirect: "login",
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../views/IndexLogin.vue"),
  },
  // 使用路由
  routerList,
];

const router = new VueRouter({
  mode: "hash",
  base: process.env.BASE_URL,
  routes,
});

export default router;
