<template>
  <div class="basicMaskDiv" v-if="show">
      <div class="pop">
        <div class="closeBtn" @click="closeClick"></div>
        <div class="followBtn" @click="followFun"></div>
      </div>
  </div>
</template>

<script>
import apis1 from "../../../util/apis1.js";
let { setShareFollow } = apis1;
export default {
  props: [],
  data() {
    return {
    };
  },
  created() {
    document
      .querySelector("body")
      .setAttribute(
        "style",
        "position:#fixed;top:0;height:100%;overflow:hidden"
      );
  },
  methods: {
    followFun(){
      setShareFollow((data) => {
        if(data.data.flag){
          this.$toast("您已成功完成助力！");
          this.closeClick();
        }else{
          this.$toast("助力失败！");
          this.closeClick();
        }
      });
    },
    closeClick() {
      document.querySelector("body").removeAttribute("style");
      this.submit();
      // this.$emit('closeClick');
    },
  },
};
</script>

<style lang="scss">
.basicMaskDiv{
  position: fixed;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  top: 0;
  bottom: 0;
  z-index: 200;
  .pop{
    width: 5.88rem;
    height: 6.3rem;
    background-size: 100%;
    background-image: url(//img10.360buyimg.com/imgzone/jfs/t1/206892/2/16191/66035/61e62480E090d9fa4/1cbb5c30126cf152.png);
    position: absolute;
    top: calc(50% - 6.3rem/2);
    left: calc(50% - 5.88rem/2);

    .closeBtn{
      width: .5rem;
      height: .5rem;
      position: absolute;
      right: .3rem;
      top: .3rem;
    }

    .followBtn{
      width: 4rem;
      height: .76rem;
      position: absolute;
      left: calc(50% - 4rem/2);
      top: 4.72rem;
    }
  }
}
</style>
