<template>
  <div id="box" :style="styleData.box">
    <div class="boxtitle" :style="styleData.titlestyle">{{ keyData.title }}</div>
    <!--  标题 -->
    <div id="boxprizeSwiper" :style="styleData.boxprizeSwiperdiv">
      <!--  轮播内容 -->
      <div
        class="prize"
        :style="styleData.ulbox"
        v-for="(item, index) in fissionPrizeList"
        :key="index"
      >
        <div class="imgText" :style="styleData.libox">
          <!--  li -->
          <!--:src="item.showImg"   ---------图片     -->
          <div :style="styleData.imgbox">
            <img :src="item.showImg" :style="styleData.imgdiv" alt="图片1加载失败" />
          </div>
          <!--  {{ item.prizeName }}奖品文字 -->
          <span class="PrizeItemName" :style="styleData.spanbox">{{item.prizeName}}</span>
          <div v-if="datas.isshowlingqu" :style="styleData.lingqu">{{item.prizeName}}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import apis1 from "../../../util/apis1.js";
import conSignIndexVue from '../../../pages/conSignIndex.vue';
import bus from '../../../util/bus.js'
let { drawPrize } = apis1;
export default {
  name: "fissionPrizeList2",
  props: ["isTemplate", "datas", "styleData", "keyData", "templateData"],
  data() {
    return {
      fissionPrizeList: [], //裂变抽奖奖品列表
      showList: true,
      isshowlingqu: false,
    };
  },
  created() {
    this.initData();
  },
  methods: {
    initData() {
      if (this.isTemplate == true) {
        var datasAll = this.templateData;
        if(datasAll){
           this.fissionPrizeList = datasAll.draw.prizeList
        }else{
           this.fissionPrizeList = [
             {
               showimg:"//img10.360buyimg.com/imgzone/jfs/t1/176585/24/10488/6916/60a4cb50E562734ab/f9ab956ec09a4146.png",
               prizeName: "***京豆"
             },
             {
               showimg:"//img10.360buyimg.com/imgzone/jfs/t1/176585/24/10488/6916/60a4cb50E562734ab/f9ab956ec09a4146.png",
               prizeName: "***京豆"
             },
             {
               showimg:"//img10.360buyimg.com/imgzone/jfs/t1/176585/24/10488/6916/60a4cb50E562734ab/f9ab956ec09a4146.png",
               prizeName: "***京豆"
             },
             {
               showimg:"//img10.360buyimg.com/imgzone/jfs/t1/176585/24/10488/6916/60a4cb50E562734ab/f9ab956ec09a4146.png",
               prizeName: "***京豆"
             },
             {
               showimg:"//img10.360buyimg.com/imgzone/jfs/t1/176585/24/10488/6916/60a4cb50E562734ab/f9ab956ec09a4146.png",
               prizeName: "***京豆"
             }
           ]
        }
      } else {
        bus.$on('ourprizeList',content=>{
          this.fissionPrizeList = content
        })
      }
    },
  },
};
</script>
