<template>
  <div v-if="show">
      <div class="activePrizeDivFollow" @click='clickEmpty()'>
        <div class="activeDivFollow" @click='stopClickEmpty'>
          <div id="close" @click="closeClick()"></div>
          <div id="bottom-contentFollow">
            <img :src="noImg"/>
            <p>{{ pcontent }}</p>
               <div class="win-modal-footerFollow">
                <a href="javascript:;" style="margin-right:1.1rem" class="showbtnFollow" @click="shareButton">立即分享</a>
                <a href="javascript:;" style="margin-left:-0.1rem" class="showbtnFollow" @click="enterstore">进店逛逛</a></div>
          </div>
        </div>
      </div>
  </div>
</template>
<script>
import api1 from '../../../util/apis1.js'
let {storeGoodsPoint} = api1
import store from '../../../store/store';
import {goToShopPage} from '../../../util/tools.js';
import { allShare } from "../../../js/share.js";
export default {
  props: ["isTemplate", "datas", "styleData", "keyData", "templateData"],
  data() {
    return {

    };
  },
  computed: {

  },
  methods: {
    closeClick() {
      this.submit();
    },
    //点击空白处关闭弹框
    clickEmpty(){
      this.submit();
    },
    //阻止冒泡
    stopClickEmpty(event){
      event.stopPropagation();
    },
    enterstore() {
      console.log('进入商店');
      let shopId = store.state.shopId;
      storeGoodsPoint(4)
      goToShopPage(shopId);
    },  //邀请好友
    shareButton() {

      let actStatus = sessionStorage.getItem("actStatus");


        if (actStatus == 2) {
          // Toast
          this.$toast("活动已结束");
          return;
        }
        if (actStatus == 1) {
          this.$toast("活动尚未开始");
          // Toast('活动尚未开始');
          return;
        }
      
          // Toast('活动正在惊醒中');
          // this.share = 1
          allShare(false, this, (callBackData) => {
            console.log(callBackData, "callBackData");
          });
       
      
    },
  }
};
</script>
<style lang="scss" scoped>
.activePrizeDivFollow {
  position: fixed;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  top: 0;
  z-index: 20;
}

.activeDivFollow{
  height: 6.6rem;
  width: 5.27rem;
  position: absolute;
  z-index: 2;
  margin: auto;
  top: 1rem;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0.2rem;
}

#close {
  height: 0.3rem;
  width: 0.3rem;
  position: absolute;
  right: 0.2rem;
  top: 0.2rem;
  background: url('//img10.360buyimg.com/imgzone/jfs/t1/143521/26/18654/387/5fd9e706E8f1594e3/ae5cc06440559585.png') no-repeat;
  background-size: 100% 100%;
}


#bottom-contentFollow {
  background-color: white;
  margin: auto;
  border-radius: 0.2rem;
}

#bottom-contentFollow img {
  display: block;
  margin: auto;
}

#bottom-contentFollow p {
  /* padding-top: 0.2rem; */
  font-size: 0.36rem;
  color: #f23c3c;
  display: block;
  margin-top: 0.38rem;
  text-align: center;
  /* margin-top: 0.3rem; */
}

#bottom-contentFollow button {
  display: block;
  margin: 0 auto;
  margin-top: 1.06rem;
  width: 5rem;
  background-color: #e2231a;
  color: white;
  font-size: 0.28rem;
  border-radius: 0.1rem;
  border: 1px solid #e2231a;
  padding: 0.26rem 0;
}
.win-modal-footerFollow {
    padding: 0 .36rem .36rem .36rem;
    border-radius: 0 0 10px 10px;
    text-align: center;
    background: #fff;
    margin-top: -2px;
}
.showbtnFollow {
    width: 50%;
    color: #666;
    font-size: .3rem;
    text-decoration: none;
}
</style>
