index.js 1011 Bytes
import Vue from 'vue'
import Router from 'vue-router'
import Nav from '@/components/nav'
import Login from '@/components/login'
import Search from '@/components/search'
import Contract from '@/components/contract'
import Manage from '@/components/manage'
import Main from '@/components/main'
import User from '@/components/user'


Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      component: Login
    },
    {
      path: '/nav',
      component: Nav,
      name: "nav",
      children: [{
          path: 'search',
          component: Search,
          name: 'search'
        }, {
          path: 'contract/:contract_unid',
          component: Contract,
          name:"contract"
        }, {
          path: 'manage',
          component: Manage,
          name:'manage'
        }, {
          path: 'main',
          component: Main,
          name:'main'
        }, {
          path: 'user',
          component: User,
          name:'user'
        }

      ]
    }
  ]
})