index.js 471 B

1234567891011121314151617181920
  1. import Report from "./../pages/report.vue"
  2. import Login from "./../pages/login.vue"
  3. import { getParameterByName } from "../utils/auth"
  4. const routes = [
  5. { path: '/', component: Report},
  6. { path:'/login', component: Login}
  7. ]
  8. const router = new VueRouter({routes ,mode:'hash'})
  9. // router.beforeEach((to, _, next) => {
  10. // if (to.path !== '/login' && !getParameterByName('code')) {
  11. // next('/login')
  12. // } else {
  13. // next()
  14. // }
  15. // })
  16. export default router