Header.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <!--顶部导航-->
  3. <header class="header" id="header">
  4. <!-- Logo -->
  5. <div class="navbar-left">
  6. <a href="" class="logo" target="_blank">
  7. <img src="/img/uas.png"/>
  8. </a>
  9. <span class="logo-txt">英唐保理管理</span>
  10. <span class="logo-name"><i class="fa fa-user-circle-o" v-text="$store.state.option.user.compamy"></i>&nbsp;&gt;&nbsp;<em
  11. v-text="$store.state.option.user.name"></em></span>
  12. <span class="message"><a href=""><i class="fa fa-commenting-o"></i><span class="red"></span></a></span>
  13. </div>
  14. <div class="navbar-right">
  15. <a href="http://www.ubtob.com" class="line"><i class="fa fa-cloud"></i><b>优软云</b></a>
  16. <a id="logout" @click="logout()"><i class="fa fa-power-off"></i><b>退出</b></a>
  17. </div>
  18. </header>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'header-view',
  23. methods:{
  24. logout:function(){
  25. var config = {
  26. cache:false,
  27. headers:{
  28. 'Cache-Control':'no-cache',
  29. 'Pragma':'no-cache'
  30. }
  31. }
  32. this.$axios.get('/sso/logout')
  33. .then(function (response) {
  34. if (response.data) {
  35. window.location.href = 'http://www.ubtob.com'
  36. }
  37. })
  38. .catch(function (error) {
  39. alert('退出失败');
  40. });
  41. }
  42. }
  43. }
  44. </script>