import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: require('@/page/login').default
    },
    {
      path: '/',
      name: 'Layout',
      component: require('@/page/layout').default,
      children: [
        {
          path: '/home',
          name: 'Home',
          component: require('@/page/home').default,
          meta: {text: '首页'}
        },
        {
          path: '/order',
          name: 'Order',
          component: require('@/page/order').default,
          meta: {text: '订单管理'}
        },
        {
          path: '/user',
          name: 'User',
          component: require('@/page/user').default,
          meta: {text: '设备查询'},
          children: [
            {
              path: '/',
              name: 'user-list',
              component: require('@/page/user/query-list').default
            }
          ]
        }
      ]
    }
  ]
})
