diff --git a/src/permission.js b/src/permission.js index 746107b..3e6575e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -23,6 +23,7 @@ Vue.prototype.$setOpenWindow = (openWindow) => { // 时间格式化 Vue.prototype.$moment = moment; router.beforeEach(async (to, from, next) => { + console.log(to, 'to') NProgress.start() Vue.prototype.$setOpenWindow(); // 设置页面标题 @@ -35,12 +36,15 @@ router.beforeEach(async (to, from, next) => { if (hasToken) { if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') { if (to.path === '/ReviewersResearch') { - await this.$store.dispatch('user/logout') OSSclient() + await this.$store.dispatch('user/logout') } if (to.path === '/ReviewersResearchForm') { OSSclient() } + if (to.path === '/login') { + OSSclient() + } next() NProgress.done() } else {