1
This commit is contained in:
@@ -29,8 +29,8 @@ const i18n = new VueI18n({
|
||||
//使用钩子函数对路由进行权限跳转
|
||||
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');
|
||||
const role = localStorage.getItem('U_name');
|
||||
const userrole = localStorage.getItem('U_status');
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user