<template>
  <div class="menu">
    <div class="nav-left">
      <div class="logo-box">
        <img class="bank-logol" src="@/assets/images/bank-logo1.png" alt="logo" />
        <img class="bank-logor" src="@/assets/images/bank-logo2.png" alt="logo" />
      </div>
    </div>
    <div class="bank-title" @click="setStatus">高级财富管理师·在线学习系统</div>
    <!-- <s-language></s-language> -->
    <div class="right">
      <div class="logo-name">{{ $GLOBAL.UserInfo.student_info.personal_name }},欢迎您回到在线学习系统</div>
      <div class="notify" @click="goNotify()">公告
        <div class="num" v-if="num">{{num}}</div>
      </div>
    </div>
  </div>
</template>

<script>
// import sLanguage from '@/components/languageSwitch/index.vue'
// import cAction from '@action'

export default {
  components: {},
  data () {
    return {
      num: 0
    }
  },
  mounted () {
    // request({
    //   component: this,
    //   actionName: 'msgAction',
    //   functionName: 'getMyMsg',
    //   data: {},
    //   thenCallback: data => {
    //     this.num = data.length
    //   },
    //   catchCallback: () => {},
    //   finallyCallback: () => {}
    // })
  },
  methods: {
    goNotify () {
      this.$router.push({ path: '/app/other/message' })
    },
    setStatus () {
      if (this.status) {
        this.status = false
      } else {
        this.status = true
      }
      this.$root.$emit('updateStatus', this.status)
    }
  }
}
</script>

<style scoped lang="scss">
.menu {
  width: 100%;
  height: 100%;
  color: #ffffff;
  display: flex;
  align-items: center;
  .nav-left {
    display: flex;
    position: relative;
    height: 100%;
    align-items: center;
    img.logo {
      position: absolute;
      left: 0;
      top: 50%;
      height: 37%;
      width: auto;
      transform: translateY(-50%);
    }
    .text-title {
      float: left;
      margin-left: 190px;
      line-height: 60px;
      font-size: 16px;
    }
  }
  .bank-title{
    font-size:24px;
    color:rgba(102,102,102,1);
    margin-left: 80px;
  }
  .right{
    display: flex;
    color:#333333;
    margin-left: auto;
    font-size:18px;
    margin-right: 35px;
    .logo-name{
      margin-right: 40px;
      line-height: 60px;
    }
  }
  .notify {
    position: relative;
    padding: 0 20px;
    line-height: 60px;
    font-size: 16px;
    color: #000;
    cursor: pointer;
    .num {
      position: absolute;
      top: 9px;
      left: 50px;
      padding: 1px 5px 2px 4px;
      font-size: 12px;
      line-height: 14px;
      color: #ffffff;
      background: #fb2121;
      border-radius: 50%;
    }
  }
}
.logo-box{
  .bank-logor{
    margin-left: 3px;
  }
  img{
    height: 26px;
  }
}

@media (max-width: 767px) {
  .menu {
    .nav-left {
      img.logo {
        display: none;
      }
      .text-title {
        margin-left: 0;
      }
    }
  }
}
</style>
