37 lines
536 B
Vue
37 lines
536 B
Vue
<template>
|
|
<div class='cp-div'>
|
|
<TopMenu />
|
|
<router-view />
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="less" scoped>
|
|
.cp-div {
|
|
padding-top: 60px;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
import TopMenu from './topMenu'
|
|
import {mapActions} from 'vuex'
|
|
export default {
|
|
name: 'ControlPanel',
|
|
components: {
|
|
TopMenu
|
|
},
|
|
data () {
|
|
return {}
|
|
},
|
|
created () {
|
|
this.checkSession((flag) => {
|
|
if (flag === false) {
|
|
this.$router.replace('/')
|
|
}
|
|
})
|
|
},
|
|
methods: {
|
|
...mapActions(['checkSession'])
|
|
}
|
|
}
|
|
</script>
|