| | |
| | | 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') |
| | |
| | | |
| | | // 路由执行之前的一些操作 |
| | | router.beforeEach((to, from, next) => { |
| | | const isInternalLink = from.fullPath.includes('/testBookReader') |
| | | if (isInternalLink) { |
| | | sessionStorage.removeItem('loginCtx') |
| | | } else { |
| | | sessionStorage.setItem('loginCtx', loginCtx) |
| | | } |
| | | |
| | | next() |
| | | // if (handleGetToken()) { |
| | | // // 是否是登录页面,直接到首页 |