From e7932d7a92de25b1a53b0b4fe3262b6240044d1b Mon Sep 17 00:00:00 2001 From: litian <2804272236@qq.com> Date: 星期二, 05 十一月 2024 17:58:30 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TextbookReader --- src/main.ts | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8a1e974..6b7a137 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,6 +10,7 @@ import toolClass from '@/assets/js/toolClass' import MG from '@/assets/js/middleGround/WebMiddleGroundApi.js' import './child.ts' +import { loginCtx } from '@/assets/js/config.ts' const handleGetToken = () => { return localStorage.getItem('token') @@ -17,6 +18,13 @@ // 璺敱鎵ц涔嬪墠鐨勪竴浜涙搷浣� router.beforeEach((to, from, next) => { + const isInternalLink = from.fullPath.includes('/testBookReader') + if (isInternalLink) { + sessionStorage.removeItem('loginCtx') + } else { + sessionStorage.setItem('loginCtx', loginCtx) + } + next() // if (handleGetToken()) { // // 鏄惁鏄櫥褰曢〉闈紝鐩存帴鍒伴椤� -- Gitblit v1.9.1