<template>
  <div class="prizeTypeThreeDivAllC1">
    <div class="ui-modal-body" :style="styleData.uiModalBody">
      <div class="ui-content-box">
        <div class="prizeItemDiv" v-for="(item, index) in giftBagData.prizeData">
          <div class="prizeIconDiv">
            <img v-if="item.prizeType == '1'" src="https://img10.360buyimg.com/imgzone/jfs/t1/215686/35/12596/38974/620b6dacE10f612d4/97a766f8921fe39f.png" />
            <img v-if="item.prizeType == '4'" src="https://img10.360buyimg.com/imgzone/jfs/t1/221283/19/10655/37277/620b6dacEf759d417/0132c2aa75302c3a.png" />
            <img v-if="item.prizeType == '101' || item.prizeType == '102'" src="https://img10.360buyimg.com/imgzone/jfs/t1/87934/29/22879/19787/620b6dadE6e712f6f/5ade96e178f1fbb0.png" />
          </div>
          <div class="beanNumDiv">
            <div class="prizeNames">
              <span>{{ (item.prizeType == '1' || item.prizeType == '4') ? item.beanNum : item.priceInfo+'元' }}</span>
              {{ (item.prizeType == '101' || item.prizeType == '102') ? '优惠券' : item.prizeTypeName }}
            </div>
            <div class="prizeLimit" v-if="item.prizeType == '101' || item.prizeType == '102'">
              满{{ item.fullPriceInfo }}元可用
            </div>
            <!-- <div class="prizeNames">
              <span>500元</span>
              优惠券
            </div>
            <div class="prizeLimit">
              满9999元可用
            </div> -->
          </div>
        </div>
      </div>
      <div class="btnDiv" @click="btnClick()"></div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['styleData', 'giftBagData'],
  data() {
    return {};
  },
  created() {
    console.log(this.giftBagData, '3个奖品数据');
  },
  methods: {
    btnClick() {
      this.$emit('btnClickEmit', {});
    }
  }
};
</script>

<style lang="scss" scoped="scoped">
.prizeTypeThreeDivAllC1 {
  .ui-content-box {
    height: 4.3rem;
    width: 4.28rem;
    position: absolute;
    left: .59rem;
    top: 2.26rem;
    .prizeItemDiv {
      width: 4.28rem;
      height: 1.29rem;
      background: url('//img10.360buyimg.com/imgzone/jfs/t1/186979/24/45586/1406/66442537F5a39f5b7/a063ae177b26fd57.png') no-repeat;
      background-size: 100%;
      margin-bottom: .19rem;
      position: relative;
      &:last-child{
        margin-bottom: 0;
      }
      .prizeIconDiv {
        position: absolute;
        width: 1.08rem;
        height: 1.08rem;
        overflow: hidden;
        border-radius: 50%;
        background: #47bdff;
        top: .13rem;
        left: .26rem;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: .1rem;
        img{
          max-width: 100%;
          max-height: 100%;
        }
      }
      .beanNumDiv {
        position: absolute;
        width: 2.83rem;
        height: 1.01rem;
        left: 1.61rem;
        top: .09rem;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        .prizeNames{
          width: 100%;
          height: .53rem;
          line-height: .58rem;
          color: #743226;
          font-size: .29rem;
          span{
            color: #000000;
            font-size: .34rem;
            line-height: .53rem;
            font-weight: 600;
          }
        }
        .prizeLimit{
          width: 1.97rem;
          height: .24rem;
          background: #ff3ac5;
          line-height: .24rem;
          font-size: .2rem;
          text-align: center;
          border-radius: .12rem;
          color: #fff;
        }
      }
    }
  }
  @keyframes big {
    0%{
      width: 3.06rem;
      height:1.06rem;
      bottom:-.59rem;
    }
    50%{
      width: 4.4rem;
      height:1.3rem;
      bottom:-.64rem;
    }
    100%{

    }
  }
  .btnDiv {
    width: 3.06rem;
    height:1.06rem;
    position: absolute;
    left: 50%;
    transform-origin: center center;
    transform: translateX(-50%);
    background: url('//img10.360buyimg.com/imgzone/jfs/t1/167680/34/45698/37557/66442536F07ee9236/55394aa063f6c889.png') no-repeat;
    background-size: 100% 100%;
      bottom:-.59rem;
    animation: big 0.5s steps(1) infinite;
  }
}
</style>
