import Vue from 'vue'
import Router from 'vue-router'
const _import = (data) => resolve => require(['@/' + data + '.vue'], resolve);

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/',
      name: 'index',
      component: _import('views/index'),
      children:[
        {
          path:'/download',
          component: _import('views/download/index')
        },
        {
          path:'/helpCenter',
          component: _import('views/helpCenter/index')
        },
        {
          path:'/home',
          component: _import('views/home/index')
        },
      ]
    }
  ]
})
