派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-01-12 883a3e0d10376f6273a808be1c2ac196602a7950
src/router/index.js
@@ -11,5 +11,21 @@
  mode: routeMode || 'hash',
  routes: routes
})
router.beforeEach((to, from, next) => {
  Vue.prototype.$cancels.forEach((cancel) => {
    cancel()
  })
  Vue.prototype.$cancels = []
  // 不需要登录认证的路由
  if (Object.hasOwnProperty.call(to.meta, 'noLoginIdentify') && to.meta.noLoginIdentify) {
    next()
    return
  }
  next()
})
router.beforeResolve((to, from, next) => {
  next()
})
router.afterEach((to, from) => {
})
export default router