From fd934f83afae1e3fce46db8610837d0e0f4d9393 Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期四, 02 十一月 2023 10:44:56 +0800 Subject: [PATCH] 按开发清单已修改 --- src/main.js | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main.js b/src/main.js index 92e15e6..d8d9357 100644 --- a/src/main.js +++ b/src/main.js @@ -8,7 +8,8 @@ import { ElMessage } from 'element-plus' // 鍏ㄥ眬寮曞叆鏍峰紡 import 'element-plus/theme-chalk/src/index.scss' - +import pinia from './stores/index'; +import { useLoadingStore } from "@/stores/loadingStore"; const app = createApp(App) @@ -24,15 +25,23 @@ next() } }) + + +const loadingStore = useLoadingStore(pinia) +router.afterEach((to, from) => { + loadingStore.clearLoading() +}) + + // 鏈湴 -// axios.defaults.baseURL = 'http://localhost:8081' +axios.defaults.baseURL = 'http://localhost:8081' // 閮ㄧ讲 -axios.defaults.baseURL = 'http://114.215.109.124:8803' +// axios.defaults.baseURL = 'http://114.215.109.124:8803' app.config.globalProperties.$http = axios app.use(ElMessage) app.config.globalProperties.$message = ElMessage app.use(router) - +app.use(pinia) app.mount('#app') -- Gitblit v1.9.3