Compare commits

..

No commits in common. "23bb88b20c799b060fbf814988c9f446cda04d34" and "3dc45e4a7e2c874a7044b774754cf0e08a959634" have entirely different histories.

2 changed files with 5 additions and 9 deletions

View File

@ -2,7 +2,7 @@
<div class="navbar" :style="showTitle ? 'background: rgba(8,17,50,0.25)' : ''" style="padding-right: 23px;"> <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" /> <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; cursor: pointer;" @click="toHome"> <div v-if="showTitle" style="color: #fff;font-size: 22px; float: left; letter-spacing: 1px; font-weight: 500; padding-left: 24px; marginTop: 5px">
<img src="../../assets/img/cnbm.png" style="width: 26px; height: 26px; position: relative; top: 6px; marginRight: 14px" alt=""> <img src="../../assets/img/cnbm.png" style="width: 26px; height: 26px; position: relative; top: 6px; marginRight: 14px" alt="">
{{ 'title' | i18nFilter }} {{ 'title' | i18nFilter }}
</div> </div>
@ -56,7 +56,7 @@
{{ 'navbar.profile' | i18nFilter }} {{ 'navbar.profile' | i18nFilter }}
</el-dropdown-item> </el-dropdown-item>
</router-link> </router-link>
<el-dropdown-item @click.native="toMain"> <el-dropdown-item @click.native="toHome">
<svg-icon class="item-icon" icon-class="help" /> <svg-icon class="item-icon" icon-class="help" />
{{ 'navbar.help' | i18nFilter }} {{ 'navbar.help' | i18nFilter }}
</el-dropdown-item> </el-dropdown-item>
@ -210,15 +210,11 @@ export default {
this.$router.push(`/login?redirect=${this.$route.fullPath}`) this.$router.push(`/login?redirect=${this.$route.fullPath}`)
clearInterval(logoutInterval) clearInterval(logoutInterval)
}, },
toMain() {
this.$store.dispatch('app/setChoicepart')
this.$router.push('/')
},
async toHome() { async toHome() {
// this.$store.dispatch('app/setChoicepart') // this.$store.dispatch('app/setChoicepart')
// this.$router.push('/') // this.$router.push('/')
if (sessionStorage.getItem('param')) { if (localStorage.getItem('param')) {
const param = JSON.parse(window.atob(sessionStorage.getItem('param'))) const param = JSON.parse(window.atob(localStorage.getItem('param')))
window.location = 'https://www.baidu.com/?' + param window.location = 'https://www.baidu.com/?' + param
} }
}, },

View File

@ -49,7 +49,7 @@ export default {
const path = location.href const path = location.href
if (path.indexOf('?') !== -1) { if (path.indexOf('?') !== -1) {
const param = path.split('?') const param = path.split('?')
sessionStorage.setItem('param', window.btoa(JSON.stringify(param[1]))) localStorage.setItem('param', window.btoa(JSON.stringify(param[1])))
} }
}, },
methods: { methods: {