单页面路由拦截 //需要你写在需要拦截的页面 例如你在首页进入到我的页面时,写在我的页面代码块里面 <template> <div> 欢迎:xxx(通this.$stort.state.vuex存储用户的变量) </div> </template> <script>