import Vue from "vue";
import Router from "vue-router";
import login from "./views/login.vue";
import index from "./views/index.vue";

Vue.use(Router);

export default new Router({
  routes: [
    { path: "/", component: login },
    {
      path: "/login", //登录
      meta: { auth: false },
      component: login
    },
    {
      path: "/index", //首页
      meta: { auth: false },
      component: index
    },
    { path: "*", redirect: "/login" }
  ]
});
