From 0567df8d688601cd288d53df81c6512142f99107 Mon Sep 17 00:00:00 2001
From: juzi <819872918@qq.com>
Date: Fri, 11 Nov 2022 10:54:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=9B=BE=E6=A0=87=E8=B7=B3?=
=?UTF-8?q?=E8=BD=ACmain?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/layout/components/Navbar.vue | 12 ++++++++----
src/views/wmsHome/index.vue | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 48e5601..3bd9d26 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -2,7 +2,7 @@
-
+
{{ 'title' | i18nFilter }}
@@ -56,7 +56,7 @@
{{ 'navbar.profile' | i18nFilter }}
-
+
{{ 'navbar.help' | i18nFilter }}
@@ -210,11 +210,15 @@ export default {
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
clearInterval(logoutInterval)
},
+ toMain() {
+ this.$store.dispatch('app/setChoicepart')
+ this.$router.push('/')
+ },
async toHome() {
// this.$store.dispatch('app/setChoicepart')
// this.$router.push('/')
- if (localStorage.getItem('param')) {
- const param = JSON.parse(window.atob(localStorage.getItem('param')))
+ if (sessionStorage.getItem('param')) {
+ const param = JSON.parse(window.atob(sessionStorage.getItem('param')))
window.location = 'https://www.baidu.com/?' + param
}
},
diff --git a/src/views/wmsHome/index.vue b/src/views/wmsHome/index.vue
index 300e113..9355326 100644
--- a/src/views/wmsHome/index.vue
+++ b/src/views/wmsHome/index.vue
@@ -49,7 +49,7 @@ export default {
const path = location.href
if (path.indexOf('?') !== -1) {
const param = path.split('?')
- localStorage.setItem('param', window.btoa(JSON.stringify(param[1])))
+ sessionStorage.setItem('param', window.btoa(JSON.stringify(param[1])))
}
},
methods: {