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

//一级路由
import Page1 from '@/pageview/page1'
import Page2 from '@/pageview/page2'
import Page3 from '@/pageview/page3'
import Page4 from '@/pageview/page4'
import Page5 from '@/pageview/page5'
import Page6 from '@/pageview/page6'
import Page7 from '@/pageview/page7'
import Page8 from '@/pageview/page8'
import Page81 from '@/pageview/page8-1'
import Page82 from '@/pageview/page8-2'
import Page9 from '@/pageview/page9'

//二级路由

//其他
//food表添加食物
import addFood  from '@/pageview/page1-1/foodAdd';
//购物车
import gouwuche from '@/pageview/page1-1/shoppingCart';

//登录
import login from '../components/navigation/login';
//注册
import reg from '../components/navigation/regist';
//忘记密码上一步，验证账号
import yanzhengUS from '../components/navigation/verifyAccount';
//忘记密码
import forgetPwd from '../components/navigation/forgetPwd';
//饭店主页面
import foodRestaurant from   '../components/navigation/Navi';
//订单中心
import orderCenter from '../pageview/page1-1/orderCenter';


Vue.use(Router)

const router = new Router({
  routes: [
    {
      path:'/',
      component:login
    },
    {
      path:'/regist',
      component:reg
    },
    {
      path:'/yanzhengUS',
      component:yanzhengUS
    },
    {
      path:'/forgetPwd',
      component:forgetPwd
    },

    {
      path:'/foodRestaurant',
      component:foodRestaurant
    },
    {
      path: '/foodRestaurant',
      component: foodRestaurant,
      children:[
        {
          path:'/foodRestaurant/food/addFood',
          component:addFood
        },
        {
          path: '/page1',
          component: Page1
        },
        {
          path: '/page2',
          component: Page2
        },
        {
          path: '/page3',
          component: Page3
        },
        {
          path: '/page4',
          component: Page4
        },
        {
          path: '/page5',
          component: Page5
        },
        {
          path: '/page6',
          component: Page6
        },
        {
          path: '/page7',
          component: Page7
        },
        {
          path: '/page8',
          component: Page8
        },
        {
          path: '/page81',
          component: Page81
        },
        {
          path: '/page82',
          component: Page82
        },
        {
          path: '/page9',
          component: Page9
        },
        {
          path:'/food/shoppingCart',
          component:gouwuche
        },
        {
          path:'/shoppingCart/orderCenter',
          component:orderCenter
        }
      ]
    },
  ]
})

export default router;
