<template>
  <div class="poster-bg" v-if="isShow">
    <div class="close" @click="isShow = false"></div>
    <div class="poster-box">
      <img :src="posterData.posterImgUrl">
      <div class="btn">
        <img src="../assets/images/button_bg.png">
        <div class="text">{{posterData.btnText}}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['posterData'],
  data () {
    return {
      isShow: false
    }
  }
}
</script>

<style scoped lang="less">
@import '~@/assets/less/common.less';
.poster-bg{
  z-index: 99;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  .close{
    position: absolute;
    top: 30px;
    right: 30px;
    width: 33px;
    height: 33px;
    background: url('../assets/images/icon_close.png');
    background-size: 100% auto;
  }
  .poster-box{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
    img{
      width: 265px;
      height: 320px;
    }
    .btn{
      position: relative;
      margin: @spacing auto;
      width: 200px;
      height: 40px;
      overflow: hidden;
      img{
        width: 100%;
        height: 100%;
      }
      .text{
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        line-height: 40px;
        font-size: 16px;
        text-align: center;
        color: #fff;
      }
    }
  }
}
</style>
