1 Star 0 Fork 2

你大爷激动的 / xmfx

forked from zoeyfRzr / xmfx 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
share.php 4.06 KB
一键复制 编辑 原始数据 按行查看 历史
zoeyfRzr 提交于 2020-04-25 18:57 . ...
<?php
$ac = $_GET['ac']??null;
$fxcode = $_GET['fxcode']??null;
$from = $_GET['from']??null;
$result = base64_decode($fxcode);
parse_str($result,$arry);
//var_export($arry);
$share_title = "你的姓名究竟隐藏了什么秘密?";
$xing = $arry['xing']??null;//姓
$username= $arry['username']??null;//用户名
$gender = $arry['gender']??null;//性别,1男,0女
$qid = $_GET['qid']??null;
$limit_arr = array('timeline','singlemessage');
if(in_array($from,$limit_arr)){//来源于微信好友或者朋友圈
$xmfx_url = "/show.php?ac=$ac&fxcode=$fxcode&qid={$qid}&t=".time();
header("location:$xmfx_url");
}else{//直接跳转详情页
$xmfx_url = "/show.php?ac=$ac&fxcode=$fxcode&qid={$qid}&t=".time();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<title><?php echo $share_title;?></title>
<script src="/statics/js/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/statics/css/share.css?v=<?php echo time();?>">
</head>
<body>
<img id="share" src="https://o99928111s.oss-cn-beijing.aliyuncs.com/sharebg.jpg">
<script>
//返回指定广告页
function jumpurl(url){
var noreferrer = true;
var a=document.createElement('a');
a.href=url;
if(noreferrer) a.rel='noreferrer';
a.click();
}
var isNeedReloadShare = false,lastBackIndex = 0,currentTime = new Date().getTime();
window.setTimeout(
function () {
history.pushState({}, null, window.location.href);
window.onpopstate = function () {
history.pushState(null, null, window.location.href);
var currentTime2 = new Date().getTime();
if (currentTime2 - currentTime < 500) {
return true;
}
lastBackIndex++;
//if (lastBackIndex % 2== 0 ) {
// location.href = "http://21.atongxin.cn/ces.html";
jumpurl("/");
//} else {
//}
return true;
};
}, 50);
</script>
<script type="text/javascript" src="http://11hongbao.oss-cn-beijing.aliyuncs.com/js/jweixin-1.1.0.js"></script>
<script type="text/javascript">
//监听微信内部分享
var _czc = _czc || [];
var shareATimes = 3,shareTTimes = 0;
var hiddenProperty = 'hidden' in document ? 'hidden': 'webkitHidden' in document ? 'webkitHidden':'mozHidden' in document ? 'mozHidden': null;
var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
var onVisibilityChange = function(){
if (!document[hiddenProperty]) {
window.show_time = Date.now();
if (show_time-hidden_time>1000){
shareATimes += 1;
if (shareATimes>4) {
shareTTimes += 1;
setTimeout(share_tip(shareATimes,shareTTimes), 2000);
} else {
setTimeout(share_tip(shareATimes,-1), 2000);
}
}else{
// console.log(show_time-hidden_time);
alert("分享失败!请分享到朋友圈即可查看!");
}
}else{
window.hidden_time = Date.now();
}
}
document.addEventListener(visibilityChangeEvent, onVisibilityChange);
//分享提示框
function share_tip(share_app_times, share_timeline_times) {
if (share_timeline_times == -1) {
if (shareATimes == 1) {
alert('第一次分享');
} else if (shareATimes == 2) {
alert('第二次分享');
} else if (shareATimes == 3) {
alert('第三次分享');
} else if (share_timeline_times < 1) {
//alert('分享失败,必须公开分享');
setTimeout(function(){
document.location.href = "<?php echo $xmfx_url;?>";
}, 100);
}
} else {
if (shareATimes <= 3) {
alert('恭喜你!分享到朋友圈即可查看签文讲解!');
} else {
setTimeout(function(){
document.location.href = "<?php echo $xmfx_url;?>";
}, 100);
}
}
}
</script>
</body>
</html>
PHP
1
https://gitee.com/aee/xmfx.git
git@gitee.com:aee/xmfx.git
aee
xmfx
xmfx
master

搜索帮助