内容目录
- 一、详细介绍
- 二、效果展示
- 1.部分代码
- 2.效果图展示
一、详细介绍
本源码是防止系统检测的,目的是防红,需要你的域名是还没有红的状态,页面挺美观的
测试环境:PHP
安卓微信打开直接会自动提示跳转浏览器,苹果端会显示一个跳转页,需要手动点击跳转
适合用在威信,单index.php文件
二、效果展示
1.部分代码
代码如下(示例):
// 更新后的JavaScript逻辑consttargetUrl='<?php echo $target_url; ?>';functionopenInBrowser(){constua=navigator.userAgent.toLowerCase();constisWechat=ua.includes('micromessenger');constisIOS=/iphone|ipad|ipod/.test(ua);if(isWechat&&isIOS){showCustomAlert('请点击右上角 <span style="color: var(--primary-color)">•••</span> 选择<br>"在Safari中打开"');}elseif(isWechat){window.location.href=window.location.href;// 触发PHP下载逻辑}else{window.location.href=targetUrl;}}asyncfunctioncopyUrl(){try{await navigator.clipboard.writeText(targetUrl);showCustomAlert('✅ 链接已复制到剪贴板<br>可粘贴到浏览器打开');}catch(err){// 兼容旧版浏览器consttextarea=document.createElement('textarea');textarea.value=targetUrl;document.body.appendChild(textarea);textarea.select();document.execCommand('copy');document.body.removeChild(textarea);showCustomAlert('✅ 链接已复制到剪贴板');}}// 自定义提示弹窗functionshowCustomAlert(message){constalertBox=document.createElement('div');alertBox.classList.add('custom-alert');alertBox.innerHTML=message;document.body.appendChild(alertBox);setTimeout(()=>{alertBox.remove();},3000);}