import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
	{
	  path: '/',
	  name: 'Home',
	  component: () => import('@/views/main.vue'),
	  redirect: '/index',
	  children: [
	    {
	      path: 'index',
	      name: 'Index',
	      component: () => import('@/views/pages/index.vue')
	    },
	
	  ]
	},
	{
  path: '/login',
  name: 'login',
  component: () => import('@/views/loginmain.vue'),
  redirect:'/login',
  children: [
    {
      path: '/login',
      name: 'Home',
      component: () => import('@/views/pages/login.vue')
    }
  ]
},


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
  scrollBehavior(to, from, savedPosition) {
    return {
      x: 0,
      y: 0
    }
  }
})

export default router