11-wms-zjl #8

Merged
juzi merged 3 commits from 11-wms-zjl into master 2022-11-03 14:31:12 +08:00
2 changed files with 15 additions and 4 deletions
Showing only changes of commit 73a60d5da3 - Show all commits

View File

@ -11,10 +11,12 @@
<div class="right-menu"> <div class="right-menu">
<div v-if="showhome" class="right-menu-back" @click="toHome"> <!-- <div v-if="showhome" class="right-menu-back" @click="toHome">
<svg-icon class="item-icon" icon-class="home" style="height: 24px; width: 24px; vertical-align: -6px; margin-right: 2px;" /> <svg-icon class="item-icon" icon-class="home" style="height: 24px; width: 24px; vertical-align: -6px; margin-right: 2px;" />
{{ 'navbar.homepage' | i18nFilter }} {{ 'navbar.homepage' | i18nFilter }}
</div> </div> -->
<div :style="showTitle ? 'color: #fff' : ''" class="right-menu-back" @click="toHome">
<svg-icon class="item-icon" icon-class="home" style="height: 24px; width: 24px; vertical-align: -6px; margin-right: 2px;" /></div>
<el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="avatar-container right-menu-item hover-effect" trigger="click">
<el-badge :hidden="alarmNum>0?false:true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm"> <el-badge :hidden="alarmNum>0?false:true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm">
<svg-icon style="width: 24px; height: 24px" class="item-icon" icon-class="alarm" /> <svg-icon style="width: 24px; height: 24px" class="item-icon" icon-class="alarm" />
@ -204,8 +206,12 @@ export default {
clearInterval(logoutInterval) clearInterval(logoutInterval)
}, },
async toHome() { async toHome() {
this.$store.dispatch('app/setChoicepart') // this.$store.dispatch('app/setChoicepart')
this.$router.push('/') // this.$router.push('/')
if (localStorage.getItem('param')) {
const param = JSON.parse(window.atob(localStorage.getItem('param')))
window.location = 'https://www.baidu.com/?' + param
}
}, },
handleAlarm() {}, handleAlarm() {},
getAlarm() { getAlarm() {

View File

@ -33,6 +33,11 @@ export default {
}, },
mounted() { mounted() {
this.getModuleList() this.getModuleList()
const path = location.href
if (path.indexOf('?') !== -1) {
const param = path.split('?')
localStorage.setItem('param', window.btoa(JSON.stringify(param[1])))
}
}, },
methods: { methods: {
getModuleList() { getModuleList() {