<template lang="html">
  <div class="white-bg g-mn g-mn-1">
    <div class="g-mn-bd g-mn-bd-2">
      <navbar :user="loadUser()"></navbar>
      <div class="mh576 p20">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>
<script>

import Navbar from "@/components/nav/navbar.vue";


export default {
  components: {
    Navbar
  },
  data() {
    return {
    };
  },
  methods: {

    loadUser(){
      let {uid, token, nickname} = localStorage;
      return {uid, token, nickname}
    },
    handleCommand(command) {
      if (command == "exit") {
        localStorage.removeItem("token");
        localStorage.removeItem("nickname");
        this.$router.push("/");
      }
    }
  },
  created() {
    let {token, nickname} = localStorage
    this.info = {token,nickname}
  }
};
</script>
<style lang="css">
.el-dialog {
  display: flex;
  flex-direction: column;
}
</style>
