123456789101112131415 |
- /**
- * 404 页面拦截
- * @param router
- */
- export function interceptorNotFindPage (router) {
- router.beforeEach(async (to, from, next) => {
- const canNext = to.name || to.path.includes(this.route.base)
- this.log('interceptorNotFindPage canNext', canNext)
- if (canNext) {
- next()
- } else {
- next(this.route[404])
- }
- })
- }
|