面试题:什么是全局守卫 beforeEach:全局守卫。验证用户是否登陆 面试题:watch:{“$route”(){}} 或者 beforeRouterUpdate(to,from,next); 面试题:路由分为:前端路由+后端路由