import router from './router'
import { ElMessage } from 'element-plus'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { isHttp } from '@/utils/validate'
import useUserStore from '@/store/modules/user'
import useSettingsStore from '@/store/modules/settings'
import usePermissionStore from '@/store/modules/permission'
NProgress.configure({ showSpinner: false });
const whiteList = ['/index'];
router.beforeEach((to, from, next) => {
    NProgress.start()
    next(); // 在免登录白名单，直接进入
})

router.afterEach(() => {
    NProgress.done()
})