<template>
  <div class="drawscoreDivAll">
    <div class="conten" v-if="drawRecordInfo.length > 0" :style="{ backgroundImage: `url(${drawscoreImg})` }">
      <ul>
        <li v-for="(item, index) in drawRecordInfo" :key="index">
          <p>{{ item.dayTime }}</p>
          <p>抽盒一次</p>
          <p v-if="item.status!=0" class="text-hide">获得奖品{{ item.prizeName }}</p>
          <p v-else class="text-hide">未中奖</p>
        </li>
      </ul>
    </div>
    <div v-else class="conten1"></div>
    <div class="closeDiv" @click="tocolseDiv"></div>
  </div>
</template>

<script>
export default {
  props: ["drawscoreImg", "drawRecordInfo"],
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {
    tocolseDiv() {
      this.$emit("closeDiv");
    },
  },
};
</script>

<style lang='scss' scoped>
.drawscoreDivAll {
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-image: url("//img10.360buyimg.com/imgzone/jfs/t1/214262/20/24621/20314/639d5662E7364dee7/a8c21ad78bbc41dc.jpg");
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  .conten1{
    width: 6.03rem;
    height: 7.16rem;
    background-image: url('//img10.360buyimg.com/imgzone/jfs/t1/89390/9/35543/43119/63a14639Ee49b0fb7/dff60f86f332785e.png');
    background-size: 100% 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .conten {
    width: 6.03rem;
    height: 7.16rem;
    background-size: 100% 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    ul {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 5rem;
      height: 3.5rem;
      overflow-x: hidden;
      overflow-y: auto;
      margin-top: 3rem;
      li {
        display: flex;
        flex-direction: row;
        align-items: center;
        font-size: 0.2rem;
        width: 5rem;
        justify-content: space-between;
        margin-bottom: .2rem;
      }
    }
    .btn {
      width: 1.96rem;
      height: 0.61rem;
      background-image: url("//img10.360buyimg.com/imgzone/jfs/t1/165431/6/33331/2805/63a12823Ea5c37b6d/d67d1ae8cdbc0410.png");
      background-size: 100% 100%;
      margin-top: 4.2rem;
    }
  }
  .text-hide{
        overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;    
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    width: 2rem;
    height: 0.24rem;
    text-align: center;
  }
  .closeDiv {
    width: 0.55rem;
    height: 0.55rem;
    background-image: url("//img10.360buyimg.com/imgzone/jfs/t1/62477/6/22306/1308/639ab13eEaa8fba40/455db7234cbaad08.png");
    background-size: 100% 100%;
  }
}
</style>
