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); },