import Vue from 'vue'
import Router from 'vue-router'
import Ajax from '@/components/Ajax'
import Layout from '@/components/Layout'
import Head from '@/components/Head'
import Code from '@/components/Code'
import Login from '@/components/Login'
import Register from '@/components/Register'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      name:'login',
      component:Login,
    },
    {
      path:'/register',
      name:'Register',
      component:Register,
    },
    {
      path: '/main',
      name: 'HelloWorld',
      components: {Head,Ajax,Layout,Code},
    },
  ],
  mode:'hash',
})
