From be7087a42f3df3afa3cbd4d4070314bcb7f3b958 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Thu, 23 May 2024 10:26:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 ++- src/routers/modules/dynamicRouter.ts | 8 +++++--- .../largeScreen/largeScreenOne/components/BDmaps.vue | 9 ++++++++- .../largeScreen/largeScreenOne/components/BDmaps3D.vue | 8 ++++++++ src/views/goverment/huizhou/projectList/index.vue | 4 ++++ src/views/loading/index.vue | 1 + 6 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index 3e352dd..a8a9f1c 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,8 @@ NODE_ENV = 'development' # VITE_API_URL = 'http://183.63.230.59:6090' # VITE_API_URL = 'http://2xliv7gs.shenzhuo.vip:55296' VITE_WPAPI_URL = "http://jxjzw.zhgdyun.com:8081" -VITE_API_URL = "http://jxjzw.zhgdyun.com:9013" +# VITE_API_URL = "http://jxjzw.zhgdyun.com:9013" +VITE_API_URL = 'https://xmglcs.hyjgxt.cn:6090' # 上传 # VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url=' diff --git a/src/routers/modules/dynamicRouter.ts b/src/routers/modules/dynamicRouter.ts index 59a1484..4523828 100644 --- a/src/routers/modules/dynamicRouter.ts +++ b/src/routers/modules/dynamicRouter.ts @@ -65,9 +65,11 @@ export const initDynamicRouter = async (params?: any, defaultUrl?: any) => { router.push(item.path); ++toNum; } - if (item.path != "/" && toNum < 1 && defaultUrl && item.path == defaultUrl) { - router.push(defaultUrl); - ++toNum; + if (toNum < 1 && defaultUrl && defaultUrl.indexOf(item.path) != -1) { + setTimeout(function () { + router.push(defaultUrl); + ++toNum; + }, 500); } } // globalStore.setPath(null); diff --git a/src/views/goverment/huizhou/largeScreen/largeScreenOne/components/BDmaps.vue b/src/views/goverment/huizhou/largeScreen/largeScreenOne/components/BDmaps.vue index 65274c3..d86c0ab 100644 --- a/src/views/goverment/huizhou/largeScreen/largeScreenOne/components/BDmaps.vue +++ b/src/views/goverment/huizhou/largeScreen/largeScreenOne/components/BDmaps.vue @@ -1,5 +1,6 @@