import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import register from '../views/register.vue'
import HomeHeader from '@/views/commonHeader.vue'
import list from './list'
import HomeMain from '@/components/index/VueIndex.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: 'index',
        components: {
            default: HomeMain,
            header: HomeHeader,
            // footer: HomeFooter
        }
    },
    {
        path: '/login',
        name: 'login',
        component: Login
    },
    {
        path: '/register',
        name: 'register',
        component: register
    },
    list,
]

const router = new VueRouter({
    routes
})

export default router
