<template>
  <div class="header-layout">
    <div class="fdkk-logo">
      <a href="http://www.4dkankan.com/">
        <img src="@/assets/images/svg_logo/logo.png" alt="">
      </a>
    </div>
    <div class="header-settings">
      <div class="flex-fix">
          <el-button type='primary' @click.native="loginOut" id="dropdown-btn">
            <i class="top_fix"></i>
            <span class="logout">注销</span>
          </el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      fullscreenLoading: false
    }
  },
  methods: {
    async loginOut () {
      let res = await this.$http.post('/sso/manager/logout')
      if (res.code === 0) {
        this.$http.removeToken()
        this.$router.replace('/Login')
      }
    }
  }
}
</script>

<style scoped>
.header-layout {
  background: #4491fa;
  background: -webkit-gradient(linear, left top, left bottom, from(#4491fa), to(#5653e4));
  background: -o-gradient(linear, left top, left bottom, from(#4491fa), to(#5653e4));
  background: -moz-gradient(linear, left top, left bottom, from(#4491fa), to(#5653e4));
  background: gradient(linear, left top, left bottom, from(#4491fa), to(#5653e4));
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
}

.fdkk-logo {
  position: relative;
}

.fdkk-logo>a>img {
  width: 97px;
  /*height: 26px;*/
}

.fdkk-logo>span {
  color: #fff;
}

#dropdown-btn {
  color: #fff!important;
  background: rgba(0,0,0,0);
  border: #5a45df;
  padding: 0;
}

.setting-txt {
  color: #fff;
  margin: 0 5px;
}

.icon-jiantou {
  position: absolute;
  top: 1px;
}
.top_fix {
  display: inline-block;
  background-repeat: no-repeat;
  width: 14px;
  height: 14px;
  position: relative;
  top: 2px;
  background-image: url('~@/assets/images/icon/sys_icon.png');
  background-position: 0px 0px;
}

.logout {
  color:#fff;
  font-weight: normal;
  margin-left:5px
}
</style>
