mtfosbot_web/src/components/ControlPanel/index.vue
Jay e2de8f5d85 update
1. add login action
2. add user info getter
3. add top menu ui
2018-08-20 00:31:11 +08:00

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>