<template lang="html">
  <div clss="">
    <navbar :user="userInfo"></navbar>
    <IHeader :user="userInfo"></IHeader>
    <div class="p-wrap-full m-content clear body-bg">
      <router-view></router-view>
    </div>
  </div>
</template>
<script>
import { mapGetters,mapActions } from "vuex";
import CenterNavbar from "./components/navbar/index.vue";
import IHeader from "./components/menu/iheader.vue";
import navbar from "@/components/nav/navbar.vue";
export default {
  components: {
    CenterNavbar,
    IHeader,
    navbar
  },
  data() {
    return {
    };
  },
  computed: {
  	...mapGetters("user", ["userInfo"])
  },
  beforeMount(){
     this.loadBaseInfo()
  },
  methods: {
    ...mapActions("user", ["loadBaseInfo", "doLogout"]),
    handleCommand(command) {
      if (command == "exit") {
        this.doLogout().then( res=>{
          this.$router.push('/')
        } )
      }
    }
  }
};
</script>
<style lang="css">
  .m-right-block .right-block-bd {
    padding: 13px 20px;
  }

</style>
