<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>
        </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.63rem;
    position: absolute;
    left: .77rem;
    top: 2.01rem;
    .prizeItemDiv {
      width: 4.63rem;
      height: 1.3rem;
      background: url('//img10.360buyimg.com/imgzone/jfs/t1/126144/17/41838/21456/65b0faa6F8847da9f/9569ce17e82cd29d.png') no-repeat;
      background-size: 100%;
      margin-bottom: .11rem;
      position: relative;
      &:last-child{
        margin-bottom: 0;
      }
      .prizeIconDiv {
        position: absolute;
        width: .75rem;
        height: .75rem;
        overflow: hidden;
        border-radius: 50%;
        top: .23rem;
        left: .4rem;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: .06rem;
        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: #cd2610;
            font-size: .35rem;
            line-height: .53rem;
            font-weight: 600;
          }
        }
        .prizeLimit{
          width: 2.2rem;
          height: .27rem;
          background: url('//img10.360buyimg.com/imgzone/jfs/t1/227648/34/13566/1014/65b0ffdcFb215b89e/d2124e03cdacc515.png') no-repeat;
          background-size: 100% 100%;
          line-height: .27rem;
          font-size: .2rem;
          text-align: center;
          color: #743226;
        }
      }
    }
  }
  @keyframes big {
    0%{
      width: 3.56rem;
      height: .64rem;
      bottom:-0.1rem;
    }
    50%{
      width: 4.18rem;
      height: .75rem;
      bottom:-0.155rem;
    }
    100%{

    }
  }
  .btnDiv {
    width: 3.56rem;
    height: .64rem;
    position: absolute;
    left: 50%;
    transform-origin: center center;
    transform: translateX(-50%);
    background: url('//img10.360buyimg.com/imgzone/jfs/t1/164068/15/38223/9888/65b0faa7F2af913ce/cec7028c441a9c0e.png') no-repeat;
    background-size: 100% 100%;
    bottom:-0.1rem;
    animation: big 0.5s steps(1) infinite;
  }
}
</style>
