/*
 * @Author       : yuanrunwei
 * @Date         : 2020-05-18 12:05:37
 * @LastEditors: XuTongZhang
 * @LastEditTime: 2020-08-03 15:09:54
 * @FilePath     : \ambre-admin-noob\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
// import cookiesDeploy from '../common/utils/cookiesDeploy'
Vue.use(VueRouter)
// let list

const routes = [
  // error
  {
    path: '*',
    name: 'error',
    component: resolve => require(['@/views/error'], resolve)
  },
  // login
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login.vue')
  },
  // redirect
  {
    path: '/',
    redirect: '/login'
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
