<template>
  <!--在线客服-->
  <div class="kefu">
    <div class="kefu_itemKf">
      <a :href="bottomBase.online_service" target="_blank">
        <img src="https://img.bjzxtw.org.cn/pre/public/image/online1.png">
        <p>在线客服</p>
      </a>
    </div>
    <div class="kefu_itemQQ">
      <img src="https://img.bjzxtw.org.cn/pre/public/image/qq1.png">
      <p>QQ客服</p>
      <div class="kefu_item_content_QQ">
        <div @click="addQQFriend(bottomBase.customer_service_qq)" class="qqadd">
          <img :src="bottomBase.service_qq_img" width="100" v-if="bottomBase.service_qq_img">
          <div class="qqfs">{{ bottomBase.customer_service_qq }}</div>
        </div>
        <div @click="addQQFriend(bottomBase.communications)" class="qqadd">
          <img :src="bottomBase.communications_img" width="100" v-if="bottomBase.communications_img">
          <div class="qqfs">{{ bottomBase.communications }}</div>
        </div>
        <div class="arrow"></div>
      </div>
    </div>
    <div class="kefu_itemPhone">
      <img src="https://img.bjzxtw.org.cn/pre/public/image/dianhua1.png">
      <p>电话客服</p>
      <div class="kefu_item_content_phone">
        <div class="kefu_item_content_phone_title">联系电话：</div>
        <div>{{ bottomBase.customer_service }}</div>
        <div class="arrow"></div>
      </div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  bottomBase: {
    type: Object,
    required: true
  }
})

//添加网站客服
function addQQFriend(qqNumber) {
  let qq = qqNumber.match(/\d+/g);
  // 使用tencent协议唤起QQ客户端并添加好友
  window.location.href = `tencent://message/?uin=${qq}&Site=&Menu=yes`;
}
</script>

<style lang="less" scoped>
@import url('@/assets/css/public/kefu.less');
</style>








<style lang="less" scoped>


    @media screen and (max-width:800px){/*ipad_phone*/
  

            .kefu{left:0px;bottom:0px!important;width:100%!important;height:66px!important; text-align:center; line-height:66px; z-index: 1111;position:relative!important; }
            .kefu>div{display:inline-block;margin:0px 10px!important;height:55px!important;width:90px!important; }
            .kefu>div a{display:block; height:55px;}
            .kefu>div>img{display:block;margin:3px auto 0!important;width:33px!important;height:33px!important;}
            .kefu>div>a>img{display:block;margin:3px auto 0!important;width:33px!important;height:33px!important;}
            .kefu .kefu_item_content_QQ img{margin-bottom:0px;}
             .kefu .kefu_item_content_QQ .qqfs{margin-bottom:0px;height:22px;line-height:22px;}
             .kefu .kefu_itemKf a > p{word-break: keep-all; white-space: nowrap;}
            .kefu .kefu_item_content_QQ{
                
                right:-95px;
                margin-right:50%;overflow:hidden;
                top:auto;bottom:100px;
                line-height: normal;
            }
            .qqadd:nth-of-type(1){margin-bottom:22px;}
            
            .kefu .kefu_item_content_phone{
               right:20px;
               margin-right:50%;overflow:hidden;
               top:auto;bottom:100px;
               line-height: normal;
            
            
            }  
 

    }
</style>