左侧图标跳转main
Этот коммит содержится в:
родитель
1856588f04
Коммит
0567df8d68
@ -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
|
||||
}
|
||||
},
|
||||
|
@ -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: {
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user