<template>
  <div id="app">
    <bd-menu class="outmenu"></bd-menu>
    <router-view />
  </div>
</template>

<script>
import bdMenu from "./components/menu";
export default {
  data: () => ({}),
  components: {
    bdMenu,
  },
  methods: {
    getCurrentUser() {
      this.$api.user.getNowUser().then(({ data }) => {
        if (data.success == 1) {
          console.log("--- --- ---");
          console.log(data.data);
          console.log("--- --- ---");
          this.$store.commit("userInfofun", data.data);
        } else {
          console.log(data.errMsg);
        }
      });
    },
  },
  created() {
    this.getCurrentUser();
  },
};
</script>

<style scoped>
.outmenu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
}
#app {
  background-color: #f6f7fb;
  font-size: 14px;
}
</style>
