import Report from "./../pages/report.vue"
import Login from "./../pages/login.vue"
import { getParameterByName } from "../utils/auth"

const routes = [
  { path: '/', component: Report},
  { path:'/login', component: Login}
]

const router = new VueRouter({routes ,mode:'hash'})

// router.beforeEach((to, _, next) => {
//   if (to.path !== '/login' && !getParameterByName('code')) {
//     next('/login')
//   } else {
//     next()
//   }
// })

export default router
