<template>
  <div class="group_code_popup_mask">
    <img class="share_des" v-if="showShareDes" src="@/assets/home/share.png" alt="">
    <div class="group_code_popup">
      <van-icon class="close" name="cross" @click="$emit('closeGroupCode')" />
      <img class="bg" src="@/assets/home/bg3.png" alt="">
      <img class="success" src="@/assets/home/success.png" alt="">
      <p class="success_text">支付成功</p>
      <!-- <p class="des">
        <template v-if="count">
          还差<span>{{count}}</span>人，分享链接邀请好友完成拼团吧
        </template>
        <template v-else>
          分享链接邀请好友来拼团吧
        </template>
      </p> -->
      <img class="code_img" v-if="chatGroupUrl" :src="chatGroupUrl" alt="">
      <p class="code_des" v-if="chatGroupUrl">加入拼团群实时关注拼团情况</p>
      <div class="group_btn_box">
        <div @click="showShareDes=true">
          <img class="wechat2" src="@/assets/home/wechat2.png" alt="">
          <p>分享给微信好友</p>
        </div>
        <div @click="showShareDes=true">
          <img class="wechat3" src="@/assets/home/wechat3.png" alt="">
          <p>分享至朋友圈</p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['chatGroupUrl'],
  data () {
    return {
      count: '1',
      showShareDes: false,//显示分享文案
    }
  },
  mounted () {
  },
  methods: {

  }
}
</script>
<style lang="scss" scoped>
.group_code_popup_mask {
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99;
  .share_des {
    position: absolute;
    top: 50px;
    right: 100px;
    width: 516px;
  }
}
.group_code_popup {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 624px;
  background: #fff;
  box-sizing: border-box;
  border-radius: 20px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  .close {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 40px;
    padding: 30px;
  }
  .bg {
    width: 100%;
  }
  .success {
    position: absolute;
    top: 84px;
    left: 50%;
    width: 112px;
    transform: translateX(-50%);
  }
  .success_text {
    position: absolute;
    top: 180px;
    width: 100%;
    text-align: center;
    font-size: 32px;
    font-weight: bold;
  }
  .des {
    position: absolute;
    top: 234px;
    width: 100%;
    text-align: center;
    color: #999;
    font-size: 30px;
    font-weight: bold;
  }
  .code_img {
    display: block;
    width: 372px;
    margin: 10px auto;
    margin-top: -40px;
  }
  .code_des {
    width: 100%;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
  }
  .group_btn_box {
    margin-top: 26px;
    border: 1px solid #eff1f4;
    div {
      width: 50%;
      height: 186px;
      display: inline-flex;
      align-content: center;
      justify-content: center;
      flex-wrap: wrap;
      img {
        display: block;
        width: 56px;
      }
      .wechat2 {
        width: 64px;
        height: 54px;
      }
      .wechat3 {
        width: 56px;
        height: 58px;
      }
      p {
        width: 100%;
        font-size: 28px;
        color: #999;
        text-align: center;
      }
    }
  }
}
</style>