import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/layout/index.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/editor', component: () => import('@/views/pageEditor/index.vue'),
    },
    {
      path: '/',
      component: Layout,
      redirect: '/index',
      children: [
        {
          path: 'index',
          component: () => import('@/views/index/index.vue'),
        },
        {
          path: '/aboutHW',
          component: () => import('@/views/aboutHW.vue'),
        },
        {
          path: '/productCenter',
          component: () => import('@/views/productCenter.vue'),
        },
        {
          path: '/productCenter/detail',
          component: () => import('@/views/productInfo.vue'),
        },
        {
          path: '/industryPlan',
          component: () => import('@/views/industryPlan.vue'),
        },
        {
          path: '/industryPlan/detail',
          component: () => import('@/views/productInfo.vue'),
        },
        {
          path: '/serviceSupport',
          component: () => import('@/views/serviceSupport.vue'),
        },
        {
          path: '/newsCenter/details',
          component: () => import('@/views/newsCenter/details.vue'),
        },
        {
          path: '/contactUs',
          component: () => import('@/views/contactUs/index.vue'),
        },
        {
          path: 'casesAndClients/more',
          component: () => import('@/views/casesAndClients/IOT/more.vue'),
        },
      ]
    },
  ]
})
