[HTML] 纯文本查看 复制代码
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover">
<title>请用浏览器打开</title>
</head>
<body>
[attach]6079[/attach]
<div id="tips" style="font-size:25px;text-align: center;line-height: 50px;"></div>
<script>
const url = document.location.toString();
const urlParmStr = url.slice(url.indexOf('=') + 1);
if (is_weixn_qq()) {
document.getElementById("tips").innerHTML = "请在浏览器打开本页面";
} else {
// 不是微信客户端,直接可以访问链接
location.href = urlParmStr;
}
// 判断QQUA的代码无需修改
function is_weixn_qq() {
const ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return "weixin";
} else if (ua.match(/QQ/i) == "qq") {
return "QQ";
}
return false;
}
</script>
</body>
</html>