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

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: '/index',
      children: [
        {
          path: 'productInfo',
          component: () => import('@/views/productInfo.vue'),
        },
        {
          path: 'index',
          component: () => import('@/views/index/index.vue'),
        },
        {
          path: 'productCenter/industrialInternet',
          component: () => import('@/views/productCenter/index.vue'),
        },
        {
          path: 'casesAndClients/IOT',
          component: () => import('@/views/casesAndClients/IOT/index.vue'),
        },
        {
          path: '/newsCenter',
          component: () => import('@/views/newsCenter/index.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'),
        },
      ]
    },
  ]
})
