yearning
21 小时以前 1d37c375fd114212ee1419c3bbdadc81d76666a4
src/router/index.js
@@ -7,14 +7,12 @@
  routes: [ ...errorPage, ...h5],
})
router.beforeEach((to, from, next) => {
router.beforeEach(async (to, from, next) => {
  if (!to.matched.length) {
    if (to.path === '/') {
      next({ path: '/error/404', query: { errorUrl: to.path } })
    next({ path: '/error/404', query: { errorUrl: to.fullPath } })
    return
    }
  } else {
    next()
  }
})
export default router