路漫漫其修远兮
router.beforeEach(to, from, next)
router.beforeResolve(to, from, next)
router.afterEach(to, from ,next)
beforeRouteEnter
beforeRouteUpdate
beforeRouteLeave
路由配置上直接可以设置