共执行 29 个查询,用时 0.023745 秒,在线 21 人,Gzip 已启用,占用内存 3.981 MB
// ========== 微信客服面板核心功能(整合版:复制+hover延时+打开微信) ========== // 1. 复制微信号功能 function copyWechat() { // 容错:找不到元素则直接返回,避免报错 if (!document.getElementById('wechatNum')) { return; } // 获取微信号文本 const wechatNum = document.getElementById('wechatNum').innerText; // 创建临时输入框实现复制 const tempInput = document.createElement('input'); tempInput.value = wechatNum; document.body.appendChild(tempInput); tempInput.select(); document.execCommand('copy'); document.body.removeChild(tempInput); // 显示复制成功提示 if (document.getElementById('copyTip')) { document.getElementById('copyTip').style.display = 'block'; } if (document.getElementById('openWechatBtn')) { document.getElementById('openWechatBtn').style.display = 'inline-block'; } if (document.getElementById('addGuide')) { document.getElementById('addGuide').style.display = 'block'; } // 8秒后自动隐藏复制提示 setTimeout(() => { if (document.getElementById('copyTip')) { document.getElementById('copyTip').style.display = 'none'; } }, 8000); } // 2. 打开微信功能(兼容PC/移动端) function openWechat() { const isPC = /Windows|Mac|Linux/i.test(navigator.userAgent); if (isPC) { // PC端打开微信客户端 window.open('weixin://', '_blank'); } else { // 移动端调起微信 window.open('weixin://dl/chat/', '_blank'); } } // 3. Hover延时关闭逻辑(核心:防止面板突然消失) $(function() { // 只在有微信面板的页面执行,避免全局报错 if ($('.quick-area:has(.qr-code)').length === 0) return; let wechatTimer = null; // 定义全局计时器 // 鼠标hover微信图标:显示面板 + 清除倒计时 $('.quick-area:has(.qr-code)').hover( function() { clearTimeout(wechatTimer); $(this).find('.quick-sidebar').show(); }, function() { // 鼠标离开图标:300ms后隐藏面板(给移动到面板的时间) wechatTimer = setTimeout(() => { $(this).find('.quick-sidebar').hide(); }, 300); } ); // 鼠标hover面板:保持显示 + 清除倒计时 $('.sidebar-code').hover( function() { clearTimeout(wechatTimer); $(this).show(); }, function() { // 鼠标离开面板:300ms后隐藏面板 wechatTimer = setTimeout(() => { $(this).hide(); }, 300); } ); }); // ========== 微信客服面板功能结束 ==========

您选购了件商品,总金额:

收货信息
姓名: 手机:
配送区域:
详细地址:
配送方式:

支付方式:

付款金额:

留言:
QQ号 微信号

39001503