<template>
  <cover-view class="coupon-content">
    <cover-view class="div coupon-wrapper">
        <cover-image mode="aspectFit" src="@/static/image/live/coupon.png" class="img coupon-img" />
        <cover-view class="div info">
            <cover-view class="title-wrapper"><text class="div title">{{voucher.vouchertemplate_points?voucher.vouchertemplate_points:'免'}}积分兑换</text></cover-view>
            <cover-view class="desc-wrapper"><text class="div desc">满{{voucher.vouchertemplate_limit}}减{{voucher.vouchertemplate_price}}</text></cover-view>
            <cover-view class="btn-wrapper"><text class="div btn"  @click="usecoupon">立即领取</text></cover-view>
        </cover-view>
        <cover-image mode="aspectFit" src="@/static/image/live/close-w.png" class="img close" @click="close"/>
    </cover-view>
  </cover-view>

</template>

<script>
export default {
  props: {
    voucher: {}
  },
  data () {
    return {}
  },
  methods: {
    showgoods () {
      this.$emit('showgoods')
    },
    close () {
      this.$emit('hidecoupon')
    },
    usecoupon () {
      this.$emit('usecoupon')
    }
  },
  computed: {},
  created () {

  }
}
</script>
<style lang="scss" scoped>
  .coupon-content{
      /*  #ifndef  APP-PLUS-NVUE  */
      display: flex;
      /*  #endif  */
      justify-content: center;
      align-items: center;
  }
    .coupon-wrapper {
        width: 555rpx;
        height: 313rpx;
        position: relative;
        /*  #ifndef  APP-PLUS-NVUE  */
        margin: 0 auto;
        /*  #endif  */
    }
    .coupon-img {
        width: 555rpx;
        height: 313rpx;
        position: absolute;
        z-index: 1;
        top: 0;
        left: 0;
    }
    .info {
      /*  #ifndef  APP-PLUS-NVUE  */
      display: flex;
      /*  #endif  */
      flex-direction: column;
      align-items: center;
      justify-content: center;
        width: 555rpx;
        height: 313rpx;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
    }
    .title-wrapper{
      margin-top: 47rpx;
        text-align: center;
    }
    .title {
        font-family: PingFangSC-Medium;
        font-size: 14px;
        color: #FFFFFF;
        /*  #ifndef  APP-PLUS-NVUE  */
        letter-spacing: 0;
        /*  #endif  */
        line-height: 40rpx;
    }
    .desc-wrapper{
        margin-top: 31rpx;
        text-align: center;
    }
    .desc {
        font-family: PingFangSC-Regular;
        font-size: 18px;
        color: #FFFFFF;
        /*  #ifndef  APP-PLUS-NVUE  */
        letter-spacing: 0;
        /*  #endif  */
        line-height: 50rpx;
    }
    .btn-wrapper{
          height: 64rpx;
          width: 316rpx;
        border-radius: 39.5rpx;
        border-radius: 39.5rpx;
        background: #FFFFFF;
        text-align: center;
      /*  #ifndef  APP-PLUS-NVUE  */
      display: flex;
      /*  #endif  */
      align-items: center;
      justify-content: center;
        margin-top: 46rpx;
    }
    .btn {
        padding: 0;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #F16161;
        /*  #ifndef  APP-PLUS-NVUE  */
        letter-spacing: 0;
        /*  #endif  */
        line-height: 64rpx;
        
    }
    .close{
        width: 52rpx;
        height: 52rpx;
        position: absolute;
        top: 20rpx;
        right: 20rpx;
        z-index: 2
    }
</style>
