<template> <div class="sannong"> <NuxtLayout> <NuxtPage></NuxtPage> <ul class="kefu"> <li> <el-popover ref="popover" placement="right" :width="190" trigger="hover"> <template #reference> <img src="./public/image/qq 1.png"> </template> <p @click="addQQFriend(2909421493)" class="qqadd"> <img src="./public/index/tubiao1.png" width="100"> <div class="qqfs">客服QQ: 2909421493</div> </p> <p @click="addQQFriend(213552413)" class="qqadd"> <img src="./public/index/tubiao2.png" width="100"> <div class="qqfs">通联QQ: 213552413</div> </p> </el-popover> <h6>QQ客服</h6> </li> <li> <el-popover ref="popover" placement="right" :width="80" trigger="hover"> <template #reference> <img src="./public/image/dianhua 1.png"> </template> <p>联系电话:</p> <p>010-56019387</p> </el-popover> <h6>电话客服</h6> </li> </ul> <!-- <ul class="kefu"> <li> <img src="./static//image/weixin 1.png" alt=""> <p>微信客服</p> </li> <li> <img src="./static//image/qq 1.png" alt=""> <p>QQ客服</p> </li> <li> <img src="./static//image/dianhua 1.png" alt=""> <p>电话客服</p> </li> <li @click="close"> <img src="./static//image/guanbi 1.png" alt=""> <p>关闭</p> </li> </ul> --> <!-- <div class="kefu1"> <img src="./static//image/weixin 1.png" alt=""> </div> --> </NuxtLayout> <!-- <div class="zhinengwenda"> <Zhinengqwnda></Zhinengqwnda> </div> --> </div> </template> <script setup> import { ElPopover } from 'element-plus' let close = () => { let kefu = document.querySelector('.kefu') kefu.style.display = 'none' } //添加好友 function addQQFriend(qqNumber) { // 使用tencent协议唤起QQ客户端并添加好友 window.location.href = `tencent://message/?uin=${qqNumber}&Site=&Menu=yes`; } </script> <style lang="less" scoped> .kefu { width: 100px; // height: 445px; height: 200px; position: fixed; // bottom: 80px; // right: 129px; bottom: 50px; right: 10px; >li { width: 100px; height: 100px; margin-bottom: 15px; text-align: center; background-color: #fff; box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.1); border-radius: 10px; img { width: 60px; height: 60px; margin-top: 10px; } h6 { font-family: PingFang SC, PingFang SC; font-weight: 500; font-size: 14px; color: #666666; line-height: 16px; } p { font-weight: 400; font-size: 12px; } } } .kefu1 { width: 70px; height: 70px; position: fixed; bottom: 0px; right: 220px; } .zhinengwenda { width: 360px; height: 562px; position: fixed; bottom: 85px; right: 220px; // border: 1px solid #CCCCCC; box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.1); border-radius: 10px; background-color: #fff; z-index: 1000; } .qqadd { display: block; cursor: pointer; text-align: center; img { margin-top: 20px; width: 130px; height: 130px; } .qqfs { font-weight: bold; font-size: 12px; color: #333333; } } </style>