From f5a35a28810a7c322f50b1591bb36dc7ccd3b90d Mon Sep 17 00:00:00 2001 From: aBin Date: Fri, 4 Mar 2022 15:09:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E7=AE=80=E4=BB=8B=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=A0=87=E9=A2=98=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LeftNav/LeftNav.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/LeftNav/LeftNav.vue b/src/components/LeftNav/LeftNav.vue index d445e9a..8ec15a1 100644 --- a/src/components/LeftNav/LeftNav.vue +++ b/src/components/LeftNav/LeftNav.vue @@ -63,13 +63,12 @@ export default { childCode = item.children[0].code; } if (!url) { + const path = window.location.href.split('?'); if (this.code && code !== this.code) { - const path = window.location.href.split('?'); window.location.href = path[0] + `?code=${childCode}`; this.$emit('changeCode', code); this.childCode = code; } else if (code === this.code) { - const path = window.location.href.split('?'); window.location.href = path[0] + `?code=${code}`; } } else {