From 0ee16e9f5dd31c6c98df1a5fdcf081c8eb7f80df Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期二, 14 十一月 2023 13:15:55 +0800 Subject: [PATCH] 修改了获取风险值的请求接口 --- src/main.js | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 92e15e6..04920ab 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,6 +25,14 @@ next() } }) + + +const loadingStore = useLoadingStore(pinia) +router.afterEach((to, from) => { + loadingStore.clearLoading() +}) + + // 鏈湴 // axios.defaults.baseURL = 'http://localhost:8081' // 閮ㄧ讲 @@ -33,6 +42,6 @@ app.use(ElMessage) app.config.globalProperties.$message = ElMessage app.use(router) - +app.use(pinia) app.mount('#app') -- Gitblit v1.9.3