import router from './router'
import NProgress from 'nprogress' // progress bar 进度条
import 'nprogress/nprogress.css' // progress bar style 进度条样式
// import { Message } from 'element-ui'


NProgress.configure({ showSpinner: false })// NProgress configuration

// const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单
// 全局钩子
router.beforeEach((to, from, next) => {
  NProgress.start() // 加载进度条
  next()
})

router.afterEach(() => {
  NProgress.done() // 结束Progress
})
