<template>

  <!--顶部导航-->
  <header class="header" id="header">
    <!-- Logo -->
    <div class="navbar-left">
      <a href="" class="logo" target="_blank">
        <img src="/img/uas.png"/>
      </a>
      <span class="logo-txt">英唐保理管理</span>
      <span class="logo-name"><i class="fa fa-user-circle-o" v-text="$store.state.option.user.compamy"></i>&nbsp;&gt;&nbsp;<em
        v-text="$store.state.option.user.name"></em></span>
      <span class="message"><a href=""><i class="fa fa-commenting-o"></i><span class="red"></span></a></span>
    </div>
    <div class="navbar-right">
      <a href="http://www.ubtob.com" class="line"><i class="fa fa-cloud"></i><b>优软云</b></a>
      <a id="logout" @click="logout()"><i class="fa fa-power-off"></i><b>退出</b></a>
    </div>
  </header>


</template>

<script>
    export default {
      name: 'header-view',
      methods:{
      logout:function(){
      var config = {
        cache:false,
        headers:{
          'Cache-Control':'no-cache',
          'Pragma':'no-cache'
        }
      }
      this.$axios.get('/sso/logout')
        .then(function (response) {
          if (response.data) {
            window.location.href = 'http://www.ubtob.com'
          }
        })
        .catch(function (error) {
          alert('退出失败');
        });
    }
      }
    }
</script>

