<template>
  <div class="page">
    <div class="logoBox" @click="go('/')">
      <img src="../../assets/img/LOGO1.png" class="logo" />
      <div class="userInfo">
        <div>用户名</div>
        <img class="userImg" src="../../assets/img/user center.png" />
      </div>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
import { mapState, mapActions } from "vuex";
import { Toast } from "vant";
import baseUrl from "../../api/baseUrl";

Vue.use(Toast);
export default {
  data() {
    return {};
  },
  computed: {
    ...mapState({
      characters: (state) => state.publicObj.characters,
    }),
  },

  methods: {
    ...mapActions(["setCharacters"]),

    go(url) {
      this.$router.push(url);
    },
  },
  created() {},
};
</script>

<style lang="scss" scoped>
.page {
  .logoBox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    background-color: #606060;
    .logo {
      float: left;
      width: 140px;
      height: 40px;
    }
    .userInfo {
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: #fff;
      .userImg {
        float: right;
        width: 30px;
        height: 30px;
        margin-top: 3px;
        margin-right: 10px;
        margin-left: 15px;
      }
    }
  }
}
</style>
