<template>
  <section class="footer-btn-wrap">
    <div class="footer-btn" :style="{height: `${50+homeIndicatorHeight}` + 'Px'}">
      <div class="btn" @click="handlerMethod">{{btnText}}</div>
    </div>
  </section>
</template>

<script>
  export default {
    name: "footer-button",
    props: {
      btnText: {
        type: String,
        default: () => {
          return '确定'
        }
      },
      btnType: {
        type: Boolean,
        default: () => {
          return true
        }
      }
    },
    methods: {
      handlerMethod() {
        if(this.btnType) {
          this.$router.push('/activityPage')
        } else {
          this.$emit('sureBtn')
        }
      }
    }
  }
</script>

<style lang="less" scoped>
.footer-btn-wrap {
  .footer-btn {
    width: 100%;
    min-height: 50Px;
    box-shadow:0px -1px 0px 0px rgba(237,237,237,1);
    position: fixed;
    bottom: 0;
    background: #fff;
    .btn {
      width: 345px;
      height: 40Px;
      margin: 5Px auto;
      line-height: 40Px;
      text-align: center;
      background: linear-gradient(270deg,rgba(255,88,36,1) 0%,rgba(254,163,86,1) 100%);
      border-radius: 20Px;
      color: #FFFFFF;
      font-weight: 700;
      font-size: 15px;
    }
  }
}
</style>