<template>
  <div class="dialog-bg" v-if="show">
    <img
      src="https://pic01-10001430.cos.ap-shanghai.myqcloud.com/game/template1/mould_01_box_bg.png"
      class="dialog-bg-img"
    />
    <div class="content">
      <div class="title">恭喜获得</div>
      <div class="subtitle">{{ reward.prizeName }}</div>
      <div class="reward-box">
        <img :src="reward.prizeImageUrl" class="reward-img"/>
        <div class="reward-log-text">
          <span>奖品已放置</span>
          <span class="color-text">【我的奖品】</span>
        </div>
      </div>

      <div class="handle-btn" @click="close">收下</div>
      <div class="iconfont icon-guanbi" @click="close"></div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    reward: Object,
    show: Boolean,
  },
  data() {
    return {};
  },
  methods: {
    close() {
      this.$emit("update:show", false);
    },
  },
};
</script>

<style scoped>
.dialog-bg {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 99;

  background: rgba(0, 0, 0, 0.85);
}

.dialog-bg-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.dialog-bg .content {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 49%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.dialog-bg .content .title {
  color: white;
  font-size: 24px;
  font-weight: 500;
}

.dialog-bg .content .subtitle {
  color: white;
  font-size: 16px;
  font-weight: 500;
}

.dialog-bg .content .reward-box{
  width: 218px;
  border-radius: 5px;
  background: linear-gradient(90deg, #E8FFFD 0%, #FAFFE7 100%);
  text-align: center;
  margin-top: 38px;
}
.dialog-bg .content .reward-img{
  margin: 0 auto;
  padding: 29px 0 0;
  width: 150px;
  height: 150px;
}
.dialog-bg .content .reward-log-text{
  padding: 11px 0 14px;
  font-size: 12px;
  color: #21252B;
}

.dialog-bg .content .reward-log-text .color-text{
  color: rgba(33, 37, 43, 1);
  font-weight: 600;
}


.dialog-bg .content .handle-btn {
  margin: 42px auto 0;
  width: 180px;
  height: 40px;
  border-radius: 20px;
  background: #D8FCFA;
  text-align: center;
  line-height: 40px;
  color: #21252B;
  font-size: 20px;
  font-weight: 500;
  box-shadow: inset 0px 3px 3px 0px rgba(246, 255, 212, 0.8);
}

.dialog-bg .content .icon-guanbi {
  margin: 40px auto 0;
  color: white;
  opacity: 0.8;
  padding: 15px;
  font-size: 28px;
  height: 28px;
  width: 28px;
}
</style>
