diff --git a/frontend/.env.development b/frontend/.env.development index 8f13788..01e3f04 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -19,6 +19,6 @@ VITE_API_URL=/api # 开发环境跨域代理,支持配置多个 -VITE_PROXY=[["/api","http://192.168.1.124:18092/"]] +VITE_PROXY=[["/api","http://192.168.1.121:18092/"]] #VITE_PROXY=[["/api","http://192.168.1.125:18092/"]] # VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文 diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts index 3d11a40..fbd5f6e 100644 --- a/frontend/src/routers/index.ts +++ b/frontend/src/routers/index.ts @@ -46,7 +46,7 @@ router.beforeEach(async (to, from, next) => { const authStore = useAuthStore() // 1.NProgress 开始 NProgress.start() - + console.log('11111111111111'); // 2.动态设置标题 const title = import.meta.env.VITE_GLOB_APP_TITLE document.title = to.meta.title ? `${to.meta.title} - ${title}` : title diff --git a/frontend/src/routers/modules/dynamicRouter.ts b/frontend/src/routers/modules/dynamicRouter.ts index eaf517e..b0025de 100644 --- a/frontend/src/routers/modules/dynamicRouter.ts +++ b/frontend/src/routers/modules/dynamicRouter.ts @@ -36,6 +36,7 @@ export const initDynamicRouter = async () => { // 3.添加动态路由 authStore.flatMenuListGet.forEach(item => { item.children && delete item.children; + if (item.component && typeof item.component == "string") { item.component = modules["/src/views" + item.component + ".vue"]; } diff --git a/frontend/src/views/home/components/channelsTest.vue b/frontend/src/views/home/components/channelsTest.vue index 802a4fa..f3e6c73 100644 --- a/frontend/src/views/home/components/channelsTest.vue +++ b/frontend/src/views/home/components/channelsTest.vue @@ -1,5 +1,5 @@