This commit is contained in:
wangjinlei
2021-06-24 10:28:52 +08:00
parent f1d5ae1d76
commit b7d1ef35e2
8 changed files with 147 additions and 29 deletions

View File

@@ -31,7 +31,7 @@ router.beforeEach((to, from, next) => {
document.title = `${to.meta.title} | Traditional Medicine Research`;
const role = localStorage.getItem('ms_username');
const userrole = localStorage.getItem('ms_userrole');
if (!role && to.path!='/register'&&to.path!=='/submission'&&to.path!=='/img'&& to.path !=='/reviewer'&&to.path !=='/thanks' &&to.path !== '/login'&&to.path.search(/retrieve/i)<0 ) {
if (!role && to.path!='/register'&&to.path!=='/submission'&&to.path!=='/orcidLink'&&to.path!=='/img'&& to.path !=='/reviewer'&&to.path !=='/thanks' &&to.path !== '/login'&&to.path.search(/retrieve/i)<0 ) {
next('/login');
// } else if (to.meta.permission) {
// // 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已