<template>
  <div class="fissionPrizeList" v-if="showList">
    <div class="listTitle">
      <img
        src="//img10.360buyimg.com/imgzone/jfs/t1/175282/29/6852/52197/608a0cdfE49e92a30/809450edd8704c29.png"
      />
    </div>
    <div class="prizeItem">
      <div class="wrapPrize">
        <div
          class="imgText"
          v-for="(item, index) in fissionPrizeList"
          :key="index"
        >
          <img :src="item.showImg" />
          <span class="PrizeItemName">{{ item.prizeName }}</span>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import apis1 from "../../../util/apis1.js";
let { drawPrize } = apis1;
export default {
  name: "fissionPrizeList",
  data() {
    return {
      fissionPrizeList: [], //裂变抽奖奖品列表
      showList: true,
    };
  },
  created() {
    this.initData();
  },
  methods: {
    initData() {
      drawPrize((datas) => {
        this.fissionPrizeList = datas.data.prizeInfo;
      });
    },
  },
};
</script>
<style scoped>
.fissionPrizeList {
  /* height: 8rem; */
  width: 100%;
  /* background-color: red; */
}
.listTitle img {
  width: 100%;
  height: 2rem;
}
.wrapPrize {
  width: 6.2rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  overflow-x: scroll;
  margin-left: 0.2rem;
  overflow-y: hidden;
}
.prizeItem {
  background-image: url("//img10.360buyimg.com/imgzone/jfs/t1/192870/6/434/3552/608a0cdfE6e81525b/be7a907108417039.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  width: 6.8rem;
  height: 3rem;
  margin-top: -1.1rem;
  margin-left: 0.35rem;
  display: flex;
  align-items: center;
}
.imgText {
  display: block;
  width: 1.7rem;
  height: 2.4rem;
  margin-left: 0.2rem;
}
.prizeItem img {
  height: 2rem;
  background-color: #fff;
  border-radius: 0.1rem 0.1rem 0 0;
}
.prizeItem span {
  display: block;
  width: 1.7rem;
  height: 0.4rem;
  background-color: #e63340;
  color: #fff;
  margin-top: -5px;
  font-size: 0.1rem;
  line-height: 0.4rem;
  border-radius: 0 0 0.1rem 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
</style>
