**我想模拟一个路由拦截判断登陆状态true的话就正常跳转,false就跳转到登陆页面但是报错好像进入了死循环我感觉逻辑没问题啊求大神开导开导哪里出了问题**//main.jsimportVuefrom'vue'importAppfrom'./App'importrouterfrom'./router'importstorefrom'./vuex/store'Vue.config.productionTip=falserouter.beforeEach((to,from,next)=>{store.state.islogin?next():next('/log')})//storeimportVuefrom'vue'importVuexfrom'vuex'Vue.use(Vuex);conststate={islogin:false}
噜噜哒
手掌心
相关分类