Procházet zdrojové kódy

左侧图标跳转main

pull/12/head
juzi před 1 rokem
rodič
revize
0567df8d68
2 změnil soubory, kde provedl 9 přidání a 5 odebrání
  1. +8
    -4
      src/layout/components/Navbar.vue
  2. +1
    -1
      src/views/wmsHome/index.vue

+ 8
- 4
src/layout/components/Navbar.vue Zobrazit soubor

@@ -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
}
},


+ 1
- 1
src/views/wmsHome/index.vue Zobrazit soubor

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


Načítá se…
Zrušit
Uložit