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() {