<template>
  <div class="Header">
    <div class="H_content com-container">
        <div class="image">
          <img :src="system_logo" alt="" />
        </div>
        <div class="right">
          <span @mouseenter="onMouserEnter(false)" :class="isHover?'':'is-hover'" @click="toLogin">登录</span>
          <span @mouseenter="onMouserEnter(true)" :class="isHover?'is-hover':''" @click="toRegister">注册</span>
        </div>
    </div>
  </div>
</template>
<script>
/* eslint-disable */
export default {
  name: "Header",
  data() {
    return {
      isHover: true,
      system_logo: window.localStorage.getItem("system_logo"),
    };
  },
  created() {},
  methods: {
    toLogin() {
      this.$router.replace({ name: "index-login" });
    },
    toRegister() {
      this.$router.replace({ name: "index-register" });
    },
    onMouserEnter(val){
      this.isHover = val;
    },
  },
};
</script>
<style  lang="scss" scoped>
  @import "a/scss/common";
  .Header {
    font-family: PingFang SC;
    height: 80px;
    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.12);
    .H_content {
      height: 100%;
      display: flex;
      flex-flow: row;
      align-items: center;
      justify-content: space-between;
      .image img {
        width: 318px;
        height: 62px;
      }
      .right {
        span {
          font-size: 15px;
          font-weight: 500;
          color: #666666;
          line-height: 21px;
          padding: 10px 36px;
          border-radius: 4px;
          border: 2px solid transparent;
          &:last-child {
            margin-left: 10px;
          }
          &.is-hover{
            cursor: pointer;
            color: var(--color);
            border-color: var(--color);
          }
        }
      }
    }
  }
</style>
