From 73a60d5da3a78f917abea217d3ecff4993ff7b3d Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Thu, 3 Nov 2022 10:19:19 +0800 Subject: [PATCH] =?UTF-8?q?home=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 14 ++++++++++---- src/views/wmsHome/index.vue | 5 +++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index affc790..ec93512 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -11,10 +11,12 @@
-
+ +
+
@@ -204,8 +206,12 @@ export default { clearInterval(logoutInterval) }, async toHome() { - this.$store.dispatch('app/setChoicepart') - this.$router.push('/') + // this.$store.dispatch('app/setChoicepart') + // this.$router.push('/') + if (localStorage.getItem('param')) { + const param = JSON.parse(window.atob(localStorage.getItem('param'))) + window.location = 'https://www.baidu.com/?' + param + } }, handleAlarm() {}, getAlarm() { diff --git a/src/views/wmsHome/index.vue b/src/views/wmsHome/index.vue index 31d3c12..49d1ec8 100644 --- a/src/views/wmsHome/index.vue +++ b/src/views/wmsHome/index.vue @@ -33,6 +33,11 @@ export default { }, mounted() { this.getModuleList() + const path = location.href + if (path.indexOf('?') !== -1) { + const param = path.split('?') + localStorage.setItem('param', window.btoa(JSON.stringify(param[1]))) + } }, methods: { getModuleList() {