kefu.vue 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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" v-if="bottomBase.service_qq_img">
  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" v-if="bottomBase.communications_img">
  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. .kefu{left:0px;bottom:0px!important;width:100%!important;height:66px!important; text-align:center; line-height:66px; z-index: 1111;position:relative!important; }
  56. .kefu>div{display:inline-block;margin:0px 10px!important;height:55px!important;width:90px!important; }
  57. .kefu>div a{display:block; height:55px;}
  58. .kefu>div>img{display:block;margin:3px auto 0!important;width:33px!important;height:33px!important;}
  59. .kefu>div>a>img{display:block;margin:3px auto 0!important;width:33px!important;height:33px!important;}
  60. .kefu .kefu_item_content_QQ img{margin-bottom:0px;}
  61. .kefu .kefu_item_content_QQ .qqfs{margin-bottom:0px;height:22px;line-height:22px;}
  62. .kefu .kefu_itemKf a > p{word-break: keep-all; white-space: nowrap;}
  63. .kefu .kefu_item_content_QQ{
  64. right:-95px;
  65. margin-right:50%;overflow:hidden;
  66. top:auto;bottom:100px;
  67. line-height: normal;
  68. }
  69. .qqadd:nth-of-type(1){margin-bottom:22px;}
  70. .kefu .kefu_item_content_phone{
  71. right:20px;
  72. margin-right:50%;overflow:hidden;
  73. top:auto;bottom:100px;
  74. line-height: normal;
  75. }
  76. }
  77. </style>