28 lines
563 B
Vue
28 lines
563 B
Vue
|
|
<template>
|
|||
|
|
<div id="app">
|
|||
|
|
<router-view />
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
import { getSsoToken_CK } from './utils/auth'
|
|||
|
|
export default {
|
|||
|
|
name: 'App',
|
|||
|
|
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>
|