<template>
  <div class="shop" v-if="show">
    <div class="basicMaskDiv">
      <div class="join">
        <!-- <div class="btn" @click="close"></div> -->
        <div class="joinMember" @click="checkOpencard"></div>
        <div class="portrait">
          <img :src="img" alt="">
        </div>
        <div class="test">{{name}}邀请您加入{{shopNmae}}会员，
          <span v-if="testShow == 1">领取入会好礼</span>
          <span v-if="testShow == 2">帮Ta砍价赢优惠</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// import basicPop from './basicPop.vue';
import apis1 from "../../../util/apis1.js";
let { getMember } = apis1;
import {goToOpenCard} from '../../../util/tools.js'
export default {
  props: [],
  components: {},
  data() {
    return {
      // memberUrl:'',
      // lname:'',
      testShow:0,
    };
  },
  created() {
    this.initData();
      this.activityType = sessionStorage.getItem("activityType");
      if(this.activityType == 5 || this.activityType == 6 || this.activityType == 10005 || this.activityType == 10006){
        this.testShow = 1
      }else if(this.activityType == 7 || this.activityType == 10007){
        this.testShow = 2
      }

  },
  mounted(){
    // getMember(data=>{
    //   console.log('11111111',data)
    //   this.memberUrl = data.data.memberUrl;
    //    this.name = data.data.name
    // })
  },
  methods: {
    initData() {},
    closeClick() {
      this.submit();
      // this.$emit('closeClick');
    },
    close(){
       this.submit();
    },
    checkOpencard(){
       // location.href = this.url.replace(/%/g, '%25')//this.url
       goToOpenCard(this.url.replace(/%/g, '%25'))
    }
  },
};
</script>

<style lang="scss">
.shop {
  .basicMaskDiv {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    top: 0;
    z-index: 4999;
    .join {
      background-image: url(//img10.360buyimg.com/imgzone/jfs/t1/155942/37/6813/192603/60083811E6c464694/d6fa5d52870c62c3.png);
      width: 6rem;
      height: 7.05rem;
      position: absolute;
      top: calc(50% - 7.05rem / 2);
      left: calc(50% - 6rem / 2);
      background-size: 100%;
      .btn {
        width: 0.5rem;
        height: 0.5rem;
        // background: red;
        position: absolute;
        // opacity: 0.5;
        right: 0.08rem;
        top: 0.7rem;
      }
      .joinMember{
           width: 4.5rem;
    height: 1rem;
    position: absolute;
    top: 5.5rem;
    // background: yellow;
    left: .8rem;
    // opacity: .5;
      }
      .test{
           color: white;
    font-size: 0.36rem;
    position: absolute;
    top: 4rem;
    width: 5.5rem;
    left: calc(50% - 5.5rem/2);
    text-align: center;
      }
      .portrait{
           width: 2.28rem;
    // height: 2.28rem;
    position: absolute;
    // background-image: url(img);
    left: calc(50% - 2.28rem/2);
    top: 2rem;
    // border-radius: 50%;
    img{
      width: 100%;
      // height: 100%;
      // border-radius: 50%;
    }
      }
    }
  }
}
</style>
