--------------------------------------------全局守卫----------------------------------------------全局前置守卫(guard) router.beforeEach((to,from,next)=>{ //从from 跳转到 to // ...