<template>
  <div class="dialog-bg" v-if="show">
    <div class="content">
      <div class="title">差一点就中奖了</div>
      <div class="subtitle">一定是姿势不对，换个姿势试试</div>
      <img src="https://pic01-10001430.cos.ap-shanghai.myqcloud.com/game/template1/mould_01_fail_pic.png" class="box-img" mode="widthFix">
      <div class="handle-btn" @click="again">再抽一个</div>
      <div class="iconfont icon-guanbi" @click="close"></div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    show: Boolean
  },
  data() {
    return {};
  },
  methods: {
    again(){
      this.$emit('again');
      this.close();
    },
    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 .content{
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 49%;
  transform: translate(-50%,-50%);
  text-align: center;
  min-width: 224px;
}

.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 .box-img{
  width: 180px;
  margin: 50px auto 0;
}

.dialog-bg .content .handle-btn{
  margin: 70px auto 0;
  width: 180px;
  height: 40px;
  border-radius: 20px;
  background: rgba(216, 252, 250, 1);
  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>
