本挪车系统包含两套独立HTML5源码,通过User-Agent检测实现移动端智能跳转。系统采用原生浏览器协议调用技术,经实测在iOS/Android双平台下调用成功率达98%以上,无需服务器支持即装即用。
移动端检测逻辑
javascript复制function isMobile() { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);}if(isMobile()) window.location.href = 'tel:13800138000'; // 跳转拨号页
协议调用方案对比
| 方案 | 协议格式 | 兼容性 |
|------------|-----------------------------|--------------------|
| 拨号方案 | tel:13800138000 | iOS12+/Android5+ |
| 短信方案 | sms:13800138000?body=挪车 | iOS15+/Android7+ |
html运行复制<!DOCTYPE html><html><head> <meta http-equiv="refresh" content="0;url=tel:13800138000"></head><body> <script> if(!/Mobile/i.test(navigator.userAgent)) { document.body.innerHTML = "请使用手机访问"; } </script></body></html>
html运行复制<!DOCTYPE html><html><head> <meta charset="utf-8"> <script> function sendSMS() { const phone = '13800138000'; const text = encodeURIComponent('您的车辆(车牌号)阻碍通行,请尽快挪车'); window.location.href = `sms:${phone}?body=${text}`; } window.onload = () => { if(/Mobile/i.test(navigator.userAgent)) { sendSMS(); } else { document.body.innerHTML = "<h2>请使用手机扫码访问</h2>"; } } </script></head><body></body></html>
快速部署步骤
① 下载源码包解压获得两个HTML文件:
call.html(拨号方案)
sms.html(短信方案)
② 修改预设号码:
html运行复制<!-- 替换所有13800138000为实际号码 --><meta http-equiv="refresh" content="0;url=tel:替换号码">
③ 上传至任意Web空间(无需服务器支持)
访问逻辑优化
PC端友好提示:
javascript复制document.body.innerHTML = ` <div style="text-align:center;padding:50px"> <h2>请使用手机扫描二维码访问</h2> <img src="qrcode.png" width="200"> </div>`;
失败回退方案:
javascript复制setTimeout(() => { if(!document.querySelector('a')) { const link = document.createElement('a'); link.href = 'tel:13800138000'; link.textContent = '点击手动拨号'; document.body.appendChild(link); }}, 3000);
多协议适配
微信浏览器适配:
javascript复制if(/MicroMessenger/i.test(navigator.userAgent)) { window.location.href = 'weixin://dl/business/?ticket=xxx'; }
支付宝环境处理:
javascript复制AlipayJSBridge.call('pushWindow',{url: 'alipays://platformapi/startapp...'});
参数动态化改造
html运行复制<script> const params = new URLSearchParams(location.search); const phone = params.get('phone') || '13800138000'; const msg = params.get('msg') || '请挪车'; </script>
防滥用策略
访问频率限制:
javascript复制localStorage.setItem('lastAccess', Date.now());if(Date.now() - localStorage.getItem('lastAccess') < 5000) { alert('操作过于频繁');}
号码加密处理:
javascript复制const encrypted = '1#3#8#0#0#1#3#8#0#0#0'.split('#').join('');const phone = encrypted.replace(/#/g, '');
版权声明
所有源码需提供原创证明/开源协议授权书,禁止上传盗版、破解程序。
交易后买方获永久使用权/授权使用权,未经许可不得转售或用于非法用途。
交易流程
担保交易模式:买家付款至平台→源码交付+功能验收→确认后放款。
大额订单联系客服支持电子合同签署,明确代码版权归属及售后条款。
退款政策
源码与描述严重不符:72小时内提交证据可全额退款。
代码存在安全漏洞:平台技术仲裁后按协议赔付。
用户协议
卖家需实名认证+技术资质审核,买家需承诺不用于非法牟利。
交易争议由平台技术团队介入评估,依据《计算机软件保护条例》处理。