From 3e4b38e394bd842bc69edb39e918251a78b93663 Mon Sep 17 00:00:00 2001 From: "song.tianyang" Date: Thu, 17 Dec 2020 18:22:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0=E6=97=A7=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=97=B6=E9=A6=96=E9=A1=B5=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复缺陷:进行新旧版本切换时,接口测试功能的首页没有跟随新旧版本进行切换 --- .../src/business/components/api/head/ApiHeaderMenus.vue | 5 ++++- frontend/src/business/components/api/router.js | 6 +++++- .../src/business/components/common/head/HeaderUser.vue | 7 ++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/api/head/ApiHeaderMenus.vue b/frontend/src/business/components/api/head/ApiHeaderMenus.vue index 10dae0f5fa..9d771ecbc3 100644 --- a/frontend/src/business/components/api/head/ApiHeaderMenus.vue +++ b/frontend/src/business/components/api/head/ApiHeaderMenus.vue @@ -5,7 +5,10 @@ - + + {{ $t("i18n.home") }} + + {{ $t("i18n.home") }} diff --git a/frontend/src/business/components/api/router.js b/frontend/src/business/components/api/router.js index 0016bdb474..ab570f38ac 100644 --- a/frontend/src/business/components/api/router.js +++ b/frontend/src/business/components/api/router.js @@ -11,9 +11,13 @@ export default { { path: 'home', name: 'fucHome', - // component: () => import('@/business/components/api/home/ApiTestHome'), component: () => import('@/business/components/api/homepage/ApiTestHomePage'), }, + { + path: 'home_obsolete', + name: 'fucHome', + component: () => import('@/business/components/api/home/ApiTestHome'), + }, { path: "test/:type", name: "ApiTestConfig", diff --git a/frontend/src/business/components/common/head/HeaderUser.vue b/frontend/src/business/components/common/head/HeaderUser.vue index b77a158c10..464f5139b2 100644 --- a/frontend/src/business/components/common/head/HeaderUser.vue +++ b/frontend/src/business/components/common/head/HeaderUser.vue @@ -77,7 +77,12 @@ this.isReadOnly = !this.isReadOnly this.$store.commit('setFlag', this.isReadOnly); this.$store.commit('setValue', item); - window.location.href = "/#/api/home"; + if(item=="old"){ + window.location.href = "/#/api/home_obsolete"; + }else { + window.location.href = "/#/api/home"; + } + } } }