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 {