diff --git a/dist.zip b/dist.zip index 920a8e2..4dbe189 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/components/LeftNav/LeftNav.vue b/src/components/LeftNav/LeftNav.vue index 8ec15a1..944e424 100644 --- a/src/components/LeftNav/LeftNav.vue +++ b/src/components/LeftNav/LeftNav.vue @@ -63,13 +63,22 @@ export default { childCode = item.children[0].code; } if (!url) { - const path = window.location.href.split('?'); + // const path = window.location.href.split('?'); + const path = this.$route.path; if (this.code && code !== this.code) { - window.location.href = path[0] + `?code=${childCode}`; + // window.location.href = path[0] + `?code=${childCode}`; + this.$router.push({ + path: path, + query: { code: childCode }, + }); this.$emit('changeCode', code); this.childCode = code; } else if (code === this.code) { - window.location.href = path[0] + `?code=${code}`; + // window.location.href = path[0] + `?code=${code}`; + this.$router.push({ + path: path, + query: { code }, + }); } } else { if (url === '/') { diff --git a/src/components/Location/Location.vue b/src/components/Location/Location.vue index 0e19f45..4f1f253 100644 --- a/src/components/Location/Location.vue +++ b/src/components/Location/Location.vue @@ -8,8 +8,8 @@ 您当前位置: 首页