<template>
  <div class="contract-mine-container">
    <div class="contract-mine-title">
      3. 专属客服主动联系您：
    </div>
    <div class="contract-mine-content">
      <label for="phone" class="contract-mine-label">联系电话：</label>
      <input id="phone" v-model="phone" oninput="if(value.length > 11) value = value.slice(0, 11)" type="text" class="contract-mine-input" placeholder="请输入联系电话">
    </div>
    <button class="contract-mine-btn" @click="handle">
      与我联系
    </button>
  </div>
</template>

<script>
export default {
  name: 'ContractMine',
  data() {
    return {
      phone: ''
    }
  },

  methods: {
    handle() {
      console.log('phone', this.phone)
      this.$emit('contactMeEvent', this.phone)
    }
  }
}
</script>

<style lang="scss" scoped>
.contract-mine-container {
  .contract-mine-title {
    font-size: 16px;
    line-height: 24px;
    color: #1d1d1d;
  }
  .contract-mine-content {
    display: flex;
    align-items: center;
    margin: 8px 0 20px 0;
    padding-left: 18px;
    .contract-mine-label {
      font-size: 14px;
      line-height: 22px;
      color: #686868;
      margin-right: 8px;
    }
    .contract-mine-input {
      width: 138px;
      height: 32px;
      border-radius: 4px;
      border: 1px solid #E0E0E0;
      padding: 4px 16px;
      line-height: 32px;
      &::placeholder {
        font-size: 12px;
        line-height: 32px;
      }
    }
  }
  .contract-mine-btn {
    margin-left: 18px;
    width: 132px;
    height: 36px;
    background-color: #2ABED1;
    border-radius: 8px;
    font-size: 16px;
    line-height: 24px;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
  }

}
</style>
