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

const Home = () => import("../views/Home.vue") //PASS首页

const login = () => import("../views/login.vue") //登录页面

const no_find = () => import("../views/404") //404页面

Vue.use(VueRouter)

const routes = [
	{
		path: "/",
		name: "Home",
		component: Home
	},
	{
		path: "/replacement",
		name: "replacement",
		component: () => import("../views/replacement/replacement.vue")
	},
	{
		path: "/login",
		name: "login",
		component: login
	},
	{
		path: "*",
		name: "no_find",
		component: no_find
	}
]

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

export default router
