From 25c4cf957da623bdbe0da1c853458ee44b8f6cee Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 16 Oct 2019 17:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E9=93=81=E9=99=A2=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 3 +-- src/utils/auth.js | 16 +++++----------- src/views/trainingPlatform/demonList.vue | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/permission.js b/src/permission.js index 4afae4ed7..c787923db 100644 --- a/src/permission.js +++ b/src/permission.js @@ -45,7 +45,7 @@ function getRouteInfo(to) { clientId = LoginParams.Design.clientId; } else if (/^\/plan/.test(toRoutePath)) { const flag = getSessionStorage('design'); - if (flag) { + if (flag == true) { loginPath = loginDesignPage; getTokenInfo = getDesignToken; clientId = LoginParams.Design.clientId; @@ -118,7 +118,6 @@ router.beforeEach((to, from, next) => { // 在免登录白名单,直接进入 next(); } else { - console.log(routeInfo, '========='); // 否则全部重定向到登录页 next(routeInfo.loginPath); } diff --git a/src/utils/auth.js b/src/utils/auth.js index 386985866..8c240bb06 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -67,13 +67,11 @@ export function handleToken() { const path = window.location.href; if (path.includes('/dp/') || path.includes('/display/dp')) { return getScreenToken(); - } else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/plan') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/plan') || path.includes('/display/manage') || path.includes('/apply/')) { + } else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/plan') || path.includes('/display/manage') || path.includes('/apply/')) { return getDesignToken(); - } - // else if (path.includes('/plan') || path.includes('/display/plan')) { - // return getPlanToken(); - // } - else { + } else if (path.includes('/plan')) { + return getDesignToken() || getToken(); + } else { return getToken(); } } @@ -83,11 +81,7 @@ export function handleRemoveToken() { const path = window.location.href; if (path.includes('/dp/') || path.includes('/display/dp')) { return removeScreenToken(); - } - // else if (path.includes('/plan') || path.includes('/display/plan')) { - // return removePlanToken(); - // } - else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/plan') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/plan') || path.includes('/display/manage') || path.includes('/apply/')) { + } else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/plan') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/plan') || path.includes('/display/manage') || path.includes('/apply/')) { return removeDesignToken(); } else { return removeToken(); diff --git a/src/views/trainingPlatform/demonList.vue b/src/views/trainingPlatform/demonList.vue index e2a2dace3..60f72058d 100644 --- a/src/views/trainingPlatform/demonList.vue +++ b/src/views/trainingPlatform/demonList.vue @@ -115,7 +115,7 @@ } else if ( obj.type === '考试系统' ){ this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.mapId}`, query: { prodId: obj.code, type: obj.type }}); } else if ( obj.type === '运行图编制'){ - this.$router.push({ path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}` }) + this.$router.push({ path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`,query:{skinCode: '02'} }) } localStore.set('trainingPlatformRoute'+this.account,this.$router.history.current.fullPath); },