<template>
  <div class="success-info">
    <p class="desc">
      已有<span>{{ groupInfo.groupBuySuccessCount || 0 }}人</span>拼团成功
    </p>
    <avator-swiper :avator-data="avatorData" />
  </div>
</template>
<script>
import avatorSwiper from '@/components/avatorSwiper';
export default {
  components: {
    avatorSwiper
  },
  props: {
    groupInfo: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  data() {
    return {
      avatorData: []
    };
  },
  created() {
    if (this.groupInfo.groupBuyAllUserInfoList) {
      this.avatorData = this.groupInfo.groupBuyAllUserInfoList.map(v => {
        return v.avatar;
      });
    } else {
      this.avatorData = [];
    }
  }
};
</script>
<style lang="less" scoped>
.success-info {
  .text-14();
  color: @black;
  text-align: center;
  height: 90px;
  background: #f7f8f9;
  border-radius: @border-radius-md + 2;
  padding: 0 @padding-unit * 10 + 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  .desc {
    margin-bottom: @padding-unit * 3;
    .text-14();
    span {
      color: @red;
    }
  }
}
</style>
