<template>
  <div
    class="van-popup van-popup--bottom"
    style="background: rgba(0,0,0,0.7); z-index: 2008;height: 100vh;
    display: -webkit-box;
    -webkit-box-pack: center;
    -webkit-box-align: center;"
    v-if="show"
    @click='clickEmpty()'
  >
    <div style="width:5.9rem;height:7rem;background-size: 100%;position: relative;" @click='stopClickEmpty'>
      <img :src="img_path" />
      <div class="close-btn-readSec" @click="poptask()"></div>
      <div class="close-btn-readSec1" @click="close()"></div>
    </div>
  </div>
</template>
<script>
import { moreDialogService } from '../../../util/comCreate.js';
export default {
  name: 'failDialog',
  data() {
    return {
      img_path: 'https://img10.360buyimg.com/imgzone/jfs/t1/125587/19/7077/16212/5f0bc7ebEaa698c41/f3ad84ac3db3a901.png',
      commodityList: [], //商品信息
      isShow: false, //是否显示一键加购
      acRulePopComData: {
        styleData: {},
        datas: {},
        keyData: {}
      }
    };
  },
  created() {
    this.initData();
  },
  methods: {
    initData() {},
    close() {
      document.querySelector('body').removeAttribute('style');
      this.submit();
    },
    //点击空白处关闭弹框
    clickEmpty(){
     document.querySelector('body').removeAttribute('style');
     this.submit();
    },
    //阻止冒泡
    stopClickEmpty(event){
      event.stopPropagation();
    },
    poptask() {
      document.querySelector('body').removeAttribute('style');
      this.submit();
      moreDialogService.create(this.acRulePopComData, this.isTemplate, this.isTemplate, prizeRecordDetilClick => {
        moreDialogService.close();
      });
      this.publicData.$emit('pinshousuTaskData', this.data);
    }
  }
};
</script>
<style scoped>
.van-popup {
  position: fixed;
  max-height: 100%;
  overflow-y: auto;
  background-color: rgb(211, 31, 70);
  -webkit-transition: -webkit-transform 0.3s;
  transition: -webkit-transform 0.3s;
  transition: transform 0.3s;
  transition: transform 0.3s, -webkit-transform 0.3s;
  -webkit-overflow-scrolling: touch;
}
.van-popup--bottom {
  bottom: 0;
  left: 0;
  width: 100%;
}
.close-btn-readSec {
  width: 4rem;
  height: 1rem;
  top: 5.3rem;
  right: 0.95rem;
  position: absolute;
}
.close-btn-readSec1 {
  width: 0.45rem;
  height: 0.45rem;
  position: absolute;
  right: 0.2rem;
  top: 0.15rem;
}
</style>
