标签:ons item 路由 bsp style ora path nbsp out
//钩子 登录拦截 router.beforeEach((to, from, next) => { const sessionToken = window.sessionStorage.getItem("token"); if(to.path === ‘/‘ || to.path === ‘/Login‘) { next(); } else {//在这里可以做一些路由判断哦 if(sessionToken !=‘‘&&sessionToken !=‘null‘&&sessionToken !=null) { next(); } else { next(‘/Login‘); } } })
标签:ons item 路由 bsp style ora path nbsp out
原文地址:http://www.cnblogs.com/wb336035888/p/7722858.html