| | |
| | | import './child.ts' |
| | | import { loginCtx } from '@/assets/js/config.ts' |
| | | |
| | | // 公式输入 |
| | | import { MathfieldElement } from "mathlive" |
| | | // 公式解析 |
| | | import VueLatex from 'vatex' |
| | | |
| | | |
| | | const handleGetToken = () => { |
| | | return localStorage.getItem('token') |
| | | } |
| | | |
| | | // 路由执行之前的一些操作 |
| | | router.beforeEach((to, from, next) => { |
| | | console.log(to, from) |
| | | const isInternalLink = from.fullPath.includes('/testBookReader') |
| | | if (isInternalLink) { |
| | | console.log('通过内部链接进入项目') |
| | | sessionStorage.removeItem('loginCtx') |
| | | } else { |
| | | console.log(loginCtx, '通过外部链接进入项目') |
| | | sessionStorage.setItem('loginCtx', loginCtx) |
| | | } |
| | | |
| | |
| | | |
| | | const app = createApp(App) |
| | | |
| | | |
| | | app.provide('toolClass', toolClass) |
| | | app.provide('MG', MG) |
| | | app.use(VueLatex) |
| | | app.use(router) |
| | | app.use(ElementPlus) |
| | | app.use(pinia) |