<template>
  <div class="prizeTypeThreeDivAllC">
    <div class="ui-modal-body" :style="styleData.uiModalBody">
      <div>
        <div class="giftBagTypeDiv"><span>店铺礼包</span></div>
        <div class="titleDiv"><span>恭喜你获得一个礼包</span></div>
        <div class="ui-content-box">
          <div class="itemDiv" v-for="(item, index) in giftBagData.prizeData">
            <div class="prizeItemDiv">
              <img class="prizeIconDiv" v-if="item.prizeType == '1'" src="http://img10.360buyimg.com/imgzone/jfs/t1/3964/3/6228/3119/5ba1f217E6e73b13b/f287bebd2336359e.png" />
              <img class="prizeIconDiv" v-if="item.prizeType == '4'" src="http://img10.360buyimg.com/imgzone/jfs/t1/3696/21/6027/3158/5ba1f218E97d26a68/bb330bddd4c57d62.png" />
              <img
                class="prizeIconDiv"
                v-if="item.prizeType == '101' || item.prizeType == '102'"
                src="http://img10.360buyimg.com/imgzone/jfs/t1/685/38/6501/2937/5ba1f218E21098baf/25b373ae367d23bb.png"
              />
              <span>{{ item.prizeTypeName }}</span>
              <span class="beanNumDiv">
                <span v-if="item.prizeType == '1' || item.prizeType == '4'">{{ item.beanNum }}</span>
                <span v-else-if="item.prizeType == '101'">{{ item.priceInfo }}</span>
                <span v-else-if="item.prizeType == '102'">{{ item.priceInfo }}</span>
              </span>
            </div>
          </div>
        </div>
        <div class="btnDiv" @click="btnClick()">收下好礼</div>
      </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">
.prizeTypeThreeDivAllC {
  .giftBagTypeDiv {
    padding-top: 2.7rem;
    color: #ffffff;
    font-size: 0.5rem;
  }
  .titleDiv {
    font-size: 0.3rem;
    color: #fff;
    line-height: 0.5rem;
  }
  .ui-content-box {
    .itemDiv {
      font-size: 0.36rem;
      color: #333;
      display: flex;
      justify-content: center;
      .prizeItemDiv {
        width: 4.02rem;
        height: 0.98rem;
        display: inline-block;
        background: url(//img10.360buyimg.com/imgzone/jfs/t1/3057/24/6088/2510/5ba1f218Ee8de2794/5844e74d4953bbf3.png) no-repeat;
        background-size: 100%;
        padding-top: 0.14rem;
        padding-left: 0.2rem;
        display: flex;
        align-items: center;
        .prizeIconDiv {
          width: 0.68rem;
          height: 0.68rem;
          margin-right: 6px;
        }
        .beanNumDiv {
          color: #f23c3c;
          font-size: 0.36rem;
          margin-left: 1.05rem;
        }
      }
    }
  }
  .btnDiv {
    width: 4.4rem;
    height: 1rem;
    margin-top: 0.1rem;
    display: inline-block;
    background-color: initial;
    background-image: url(//img10.360buyimg.com/imgzone/jfs/t1/5635/5/6244/2682/5ba1f218Ebd12e789/635d6932f34bd660.png);
    background-repeat: no-repeat;
    background-size: 100%;
    font-size: 0.55rem;
    color: #fff;
    line-height: 1rem;
    text-align: center;
  }
}
</style>
