kefu.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <!--在线客服-->
  3. <div class="kefu">
  4. <div class="kefu_itemKf">
  5. <a :href="bottomBase.online_service" target="_blank">
  6. <img src="https://img.bjzxtw.org.cn/pre/public/image/online1.png">
  7. <p>在线客服</p>
  8. </a>
  9. </div>
  10. <div class="kefu_itemQQ">
  11. <img src="https://img.bjzxtw.org.cn/pre/public/image/qq1.png">
  12. <p>QQ客服</p>
  13. <div class="kefu_item_content_QQ">
  14. <div @click="addQQFriend(bottomBase.customer_service_qq)" class="qqadd">
  15. <img :src="bottomBase.service_qq_img" width="100">
  16. <div class="qqfs">{{bottomBase.customer_service_qq}}</div>
  17. </div>
  18. <div @click="addQQFriend(bottomBase.communications)" class="qqadd">
  19. <img :src="bottomBase.communications_img" width="100">
  20. <div class="qqfs">{{bottomBase.communications}}</div>
  21. </div>
  22. <div class="arrow"></div>
  23. </div>
  24. </div>
  25. <div class="kefu_itemPhone">
  26. <img src="https://img.bjzxtw.org.cn/pre/public/image/dianhua1.png">
  27. <p>电话客服</p>
  28. <div class="kefu_item_content_phone">
  29. <div class="kefu_item_content_phone_title">联系电话:</div>
  30. <div>{{bottomBase.customer_service}}</div>
  31. <div class="arrow"></div>
  32. </div>
  33. </div>
  34. </div>
  35. </template>
  36. <script setup>
  37. const props = defineProps({
  38. bottomBase: {
  39. type: Object,
  40. required: true
  41. }
  42. })
  43. //添加网站客服
  44. function addQQFriend(qqNumber) {
  45. let qq = qqNumber.match(/\d+/g);
  46. // 使用tencent协议唤起QQ客户端并添加好友
  47. window.location.href = `tencent://message/?uin=${qq}&Site=&Menu=yes`;
  48. }
  49. </script>
  50. <style lang="less" scoped>
  51. @import url('@/assets/css/public/kefu.less');
  52. </style>
  53. <style lang="less" scoped>
  54. @media screen and (max-width:800px){/*ipad_phone*/
  55. .phone_none{display:none!important;}
  56. .kefu{left:0px;bottom:0px!important;width:100%!important;height:66px!important;
  57. text-align:center; line-height:66px; z-index: 1111;position:relative!important; }
  58. .kefu>div{display:inline-block;margin:0px 10px!important;height:55px!important;width:90px!important;}
  59. .kefu>div a{display:block; height:55px;}
  60. .kefu>div>img{display:block;margin:3px auto 0!important;width:33px!important;height:33px!important;}
  61. .kefu>div>a>img{display:block;margin:3px auto 0!important;width:33px!important;height:33px!important;}
  62. .kefu .kefu_item_content_QQ img{margin-bottom:0px;}
  63. .kefu .kefu_item_content_QQ .qqfs{margin-bottom:0px;height:22px;line-height:22px;}
  64. .kefu .kefu_itemKf a > p{word-break: keep-all; white-space: nowrap;}
  65. .kefu .kefu_item_content_QQ{
  66. right:-95px;
  67. margin-right:50%;overflow:hidden;
  68. top:auto;bottom:100px;
  69. line-height: normal;
  70. }
  71. .qqadd:nth-of-type(1){margin-bottom:22px;}
  72. .kefu .kefu_item_content_phone{
  73. right:20px;
  74. margin-right:50%;overflow:hidden;
  75. top:auto;bottom:100px;
  76. line-height: normal;
  77. }
  78. }
  79. </style>