<template>
  <span class="zxzx-btn" @click="btnClick" :class="topClass">在线咨询</span>

</template>

<script>
export default {
  name: "onlineInformation",
  props: {
    myType: {
      type: String,
      default: '1'
    }
  },
  methods: {
    btnClick() {
      this.$router.push({name: 'courseware'});
    }
  },
  computed: {
    topClass() {
      const obj = {
        1: 'level_1',
        2: 'level_2',
        3: 'level_3',
        4: 'level_4',
      }
      return [obj[this.myType]];
    }
  }
}
</script>

<style lang="scss">
.zxzx-btn {
  &.level_1 {
    width: 154px;
    height: 48px;
    line-height: 48px;
    color: #00b96b;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #00b96b;
    cursor: pointer;
    display: inline-block;
    text-align: center;
  }
  &.level_2 {
    width: 154px;
    height: 48px;
    line-height: 48px;
    color: #fff;
    border-radius: 24px;
    background: #00B96B;
    border: 1px solid #00b96b;
    cursor: pointer;
    text-align: center;
  }
  @media (max-width: 768px) {
    &.level_1 {width: 44%;height:35px;line-height:35px;max-width: 120px;margin: 0 3%;
      display: inline-block;padding: 0;text-align: center;font-size: 14px;}
  }
}

</style>
