提交 ec392a66 编写于 作者: tony001's avatar tony001

锁屏路由拦截

上级 125f4da0
...@@ -51,10 +51,14 @@ Vue.use(UserComponent); ...@@ -51,10 +51,14 @@ Vue.use(UserComponent);
Vue.use(PortletComponent); Vue.use(PortletComponent);
router.beforeEach((to: any, from: any, next: any) => { router.beforeEach((to: any, from: any, next: any) => {
if (to.meta && !to.meta.ignoreAddPage) { if(sessionStorage.getItem('lockState') && to.path != '/lock'){
router.app.$store.commit('addPage', to); next({ path: '/lock'});
}else{
if (to.meta && !to.meta.ignoreAddPage) {
router.app.$store.commit('addPage', to);
}
next();
} }
next();
}); });
Interceptors.getInstance(router,store); Interceptors.getInstance(router,store);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册