<template>
  <div class="dialog-bg" v-if="show">
    <div class="content">
      <div class="title">差一点就中奖了</div>
      <div class="subtitle">一定是姿势不对，换个姿势试试</div>
      <img src="../images/mould_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: #7464E2;
  text-align: center;
  line-height: 40px;
  color: white;
  font-size: 20px;
  font-weight: 500;
  box-shadow: inset 0px 2px 2px 0px rgba(255, 255, 255, 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>
