From 8a55cfcad7dea31ed2290b86ab8d60956637aff5 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 27 Nov 2024 10:50:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5oss=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=AF=B7=E6=B1=82=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 {