From 090730ca33bf276f647a1b517eeaf60ffe9f4d0b Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期四, 23 一月 2025 15:57:40 +0800
Subject: [PATCH] 新书

---
 src/main.ts |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/main.ts b/src/main.ts
index 8a1e974..78dfb1f 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -10,6 +10,13 @@
 import toolClass from '@/assets/js/toolClass'
 import MG from '@/assets/js/middleGround/WebMiddleGroundApi.js'
 import './child.ts'
+import { loginCtx } from '@/assets/js/config.ts'
+
+// 鍏紡杈撳叆
+import { MathfieldElement } from "mathlive"
+// 鍏紡瑙f瀽
+import VueLatex from 'vatex'
+
 
 const handleGetToken = () => {
   return localStorage.getItem('token')
@@ -17,6 +24,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()) {
   //   // 鏄惁鏄櫥褰曢〉闈紝鐩存帴鍒伴椤�
@@ -66,8 +80,10 @@
 
 const app = createApp(App)
 
+
 app.provide('toolClass', toolClass)
 app.provide('MG', MG)
+app.use(VueLatex)
 app.use(router)
 app.use(ElementPlus)
 app.use(pinia)

--
Gitblit v1.9.1