<template>
  <div class="dm-wrap wechat">
    <div class="title flex_between">
      <div class="flex_between">
        <img :src="require('@/assets/img/icon-weixin.png')" class="img" />
        <h2>微信</h2>
      </div>
    </div>
    <div v-if="customServiceData">
      <h3>{{ $route.query.effectType == 0 ? '客服接口（文本、图文、图片、小程序）' : '客服接口（小程序）' }}</h3>
      <wechat-sum :data="customServiceData" />
    </div>
    <div v-if="batchData" style="margin-top: 30px">
      <h3>群发接口（文本、图文、图片）</h3>
      <wechat-sum :data="batchData" />
    </div>
  </div>
</template>

<script>
import wechatSum from './wechat-sum.vue';
export default {
  name: 'wechat',
  components: { wechatSum },
  props: {
    customServiceData: {
      type: Object || undefined
    },
    batchData: {
      type: Object || undefined
    }
  }
};
</script>

<style lang="scss" scoped>
.wechat {
  padding: 22px 20px 30px !important;
  font-family: PingFangSC-Regular, PingFang SC;
  .title {
    height: 22px;
    margin-bottom: 30px;
    line-height: 22px;
    h2 {
      font-size: 16px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 700;
      color: #303133;
      margin-left: 2px;
    }
  }
  .img {
    transform: scale(0.5);
  }
  .flex_between {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  h3 {
    display: inline-block;
    height: 25px;
    background: #bad9ff;
    line-height: 25px;
    text-align: center;
    border-radius: 2px;
    color: #303133;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 0 20px;
  }
}
</style>
