<template>
  <div class="headerContainer">
    <div class="header center-row">
      <img src="http://ttkt.sxedu.org:70/upload/setting/0/0.png?_=1557194799800" />
      <ul>
        <li :class="activeIndex == 0 ? 'li-active':''" @click="handleMenuClick(0,'index')">首页</li>
        <li :class="activeIndex == 1 ? 'li-active':''" @click="handleMenuClick(1,'notice')">通知公告</li>
        <li :class="activeIndex == 2 ? 'li-active':''" @click="handleMenuClick(2,'reviewActivity')">评审活动</li> 
        <li :class="activeIndex == 3 ? 'li-active':''" @click="handleMenuClick(3,'PastReview')">往届回顾</li>
        <li :class="activeIndex == 4 ? 'li-active':''" @click="handleMenuClick(4,'LiveBroadcast')">天天直播</li>
        <li :class="activeIndex == 5 ? 'li-active':''" @click="handleMenuClick(5,'Lessons')">优课汇聚</li>
      </ul>
      <span class="btn-login">登录</span>
    </div>
  </div>
</template>

<script>
  export default {
    name: "headers",
    props: ['parentToChild', 'identityselect'],
    data() {
      return {
        activeIndex:0
      }
    },
    created() {

    },
    methods: {
      handleMenuClick(index, route) {
        this.activeIndex = index;
        this.$router.push(route);
      }
    },
  }
</script>
<style>

  .headerContainer {
    background-color: #1f2d3d;
    height: 80px;
    position: absolute;
    min-width: 100%
  }

  .header {
    width: 1200px;
    margin: 0 auto;
    height: 80px;
    box-sizing: content-box
  }

    .header ul {
      list-style:none;
      color:#aaa;
      padding: 0 20px;
      margin-right:160px;
    }

      .header ul li {
        float:left;
        height:80px;
        width:100px;
        line-height:80px;
        text-align:center;
        padding: 0 15px;
        font-size:16px;
        cursor:pointer;
      }
        .header ul li:hover {
          background:rgba(160,160,160,.24);
          color:#33aafe;
        }

      .header ul .li-active {
        color:#33aafe;
      }
    .header .btn-login {
      color: #fff;
      font-size: 14px;
      line-height: 44px;
      display: inline-block;
      cursor:pointer;
    }
  .center-row {
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-around;
  }
</style>

