From 39a97e8e27d52ca0729cb6b0294a37717d063d0a Mon Sep 17 00:00:00 2001 From: litian <2804272236@qq.com> Date: 星期四, 22 八月 2024 16:57:55 +0800 Subject: [PATCH] 试读页 --- 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