From ed307fc6a68cd6592589a4bafb7717c0fe7f74cd Mon Sep 17 00:00:00 2001 From: litian <2804272236@qq.com> Date: 星期四, 30 五月 2024 09:21:04 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TextbookReader --- src/main.ts | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8aeabc8..6bb3e37 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,7 +8,7 @@ import router from './router' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import toolClass from '@/assets/js/toolClass' -import request from '@/plugin/axios/index.ts' +import MG from '@/assets/js/middleGround/WebMiddleGroundApi.js' import './child.ts' const handleGetToken = () => { @@ -17,11 +17,10 @@ // 璺敱鎵ц涔嬪墠鐨勪竴浜涙搷浣� router.beforeEach((to, from, next) => { - // 濡傛灉鏈塼oken if (handleGetToken()) { // 鏄惁鏄櫥褰曢〉闈紝鐩存帴鍒伴椤� if (to.path === '/login') { - next({ path: '/transmission' }) + next({ path: '/home', query: { bookId: localStorage.getItem('bookId') } }) } else { // 濡傛灉涓嶆槸鐧诲綍椤甸潰锛岃烦杞埌鐩爣鐨勯〉闈� next() @@ -36,7 +35,6 @@ } } }) - // qiankun涓诲簲鐢ㄤ笌寰簲鐢ㄩ�氳 // import { initGlobalState, type MicroAppStateActions } from 'qiankun' @@ -68,7 +66,7 @@ const app = createApp(App) app.provide('toolClass', toolClass) -app.provide('request', request) +app.provide('MG', MG) app.use(router) app.use(ElementPlus) app.use(pinia) @@ -77,4 +75,3 @@ } app.mount('#parentApp') - -- Gitblit v1.9.1