Compare commits

..

3 Commits

Author SHA1 Message Date
23bb88b20c Merge pull request '11-wms-zjl' (#12) from 11-wms-zjl into master
Reviewed-on: #12
2022-11-11 10:56:47 +08:00
1dae37bbb4 marge master 2022-11-11 10:56:03 +08:00
0567df8d68 左侧图标跳转main 2022-11-11 10:54:01 +08:00
2 changed files with 9 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<div class="navbar" :style="showTitle ? 'background: rgba(8,17,50,0.25)' : ''" style="padding-right: 23px;">
<hamburger v-if="showhome" id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<div v-if="showTitle" style="color: #fff;font-size: 22px; float: left; letter-spacing: 1px; font-weight: 500; padding-left: 24px; marginTop: 5px">
<div v-if="showTitle" style="color: #fff;font-size: 22px; float: left; letter-spacing: 1px; font-weight: 500; padding-left: 24px; marginTop: 5px; cursor: pointer;" @click="toHome">
<img src="../../assets/img/cnbm.png" style="width: 26px; height: 26px; position: relative; top: 6px; marginRight: 14px" alt="">
{{ 'title' | i18nFilter }}
</div>
@ -56,7 +56,7 @@
{{ 'navbar.profile' | i18nFilter }}
</el-dropdown-item>
</router-link>
<el-dropdown-item @click.native="toHome">
<el-dropdown-item @click.native="toMain">
<svg-icon class="item-icon" icon-class="help" />
{{ 'navbar.help' | i18nFilter }}
</el-dropdown-item>
@ -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
}
},

View File

@ -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: {