integration/src/App.vue

31 lines
653 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div id="app">
<router-view />
<RightBar />
</div>
</template>
<script>
import { getSsoToken_CK } from './utils/auth'
import RightBar from '@/components/RightBar'
export default {
name: 'App',
components: { RightBar },
computed: {
currentSSOToken() {
return this.$store.state.app.currentSSOToken
}
},
updated() {
// 判断浏览器窗口多用户true则刷新页面菜单
if (this.currentSSOToken) {
if (this.currentSSOToken !== getSsoToken_CK()) {
location.reload()
}
} else {
this.$store.commit('app/SET_CURRENTSSOTOKEN', getSsoToken_CK())
}
}
}
</script>