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

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/login',
      component: require('@/page/login')
    },
    { path: '/main', component: require('@/page/main'),
      children: [
          {
            path: 'chat',
            component: require('@/page/main/chat/chat.vue')
          },
          {
            path: 'friend',
            component: require('@/page/main/friend/friend.vue')
          },
          {
            path: 'my',
            component: require('@/page/main/friend/friend.vue')
          }
      ]
    }
  ],
  linkActiveClass: 'active'
})
router.push({ path: '/login' });
export default router