2025-12-27 16:44:06 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div id="app">
|
|
|
|
|
|
<router-view />
|
2026-01-28 10:40:29 +08:00
|
|
|
|
<RightBar />
|
2025-12-27 16:44:06 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import { getSsoToken_CK } from './utils/auth'
|
2026-01-28 10:40:29 +08:00
|
|
|
|
import RightBar from '@/components/RightBar'
|
2025-12-27 16:44:06 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'App',
|
2026-01-28 10:40:29 +08:00
|
|
|
|
components: { RightBar },
|
2025-12-27 16:44:06 +08:00
|
|
|
|
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>
|