-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresource.html
More file actions
142 lines (122 loc) · 3.46 KB
/
resource.html
File metadata and controls
142 lines (122 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html>
<head>
<title>地粒希菜籽油</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.1">
<meta name="referrer" content="never">
<style type="text/css">
#warp
{
height:2048px;
text-align: center;
display: none;
}
#iframeBox
{
display: none;
text-align: center;
height:2048px;
}
#invalid
{
display: none;
text-align: center;
}
#title
{
display:none;
font-size: 64px;
font-weight: bolder;
color: #ff6666;
}
</style>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?3ecba3a54dd980d50592f7666dd57cc3";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body onclick="exit()">
<div id = 'warp'>
<div id="invalid">
<img src="https://dilixi.gitee.io/resource/images/invalid.png">
</div>
<div id="iframeBox">
<span id = "title">手指按住二维码不放,识别二维码</span>
<iframe id="iframe" width= "100%" height="100%" frameborder='0'src="https://dilixi.gitee.io/resource/images/invalid.png" allowfullscreen="true"></iframe>
</div>
</div>
<script type="text/javascript">
var VALID_TIME = 1000*60*3;
var result = false;
var OFFICIAL_ADDRESS = 'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzA4MjEyOTk5NA==&scene=124#wechat_redirect';
var is_mobi = navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
/*var isWeixin = false;
function isAppleMobile()
{
return (navigator.platform.indexOf('iPad') != -1);
};
if(is_mobi)
{
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)=="micromessenger")
{
isWeixin = true;
}
}
if (false == isWeixin)
{
//window.location.href = OFFICIAL_ADDRESS;
window.open(OFFICIAL_ADDRESS,'_self');
}
else
{
//document.getElementById('invalid').style.display="block";
document.getElementById('warp').style.display="block";
}
*/
document.getElementById('warp').style.display="block";
function getParameter(keyWord)
{
var reg = new RegExp("(^|&)" + keyWord + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
function exit()
{
console.log('exit');
window.location.href = OFFICIAL_ADDRESS;//OFFICIAL_ADDRESS
}
var check = getParameter('check');
if(check)
{
var checkValue = Date.parse(check);
if(checkValue)
{
//if(Math.abs(new Date() - checkValue) < VALID_TIME)
{
var resource = getParameter('resource');
if(resource)
{
document.getElementById('invalid').style.display="none";
document.getElementById('iframeBox').style.display="block";
document.getElementById('title').style.display="block";
document.getElementById('iframe').src=resource;
result = true;
}
}
}
}
if(result == false)
{
document.getElementById('invalid').style.display="block";
document.getElementById('title').style.display="none";
}
</script>
</body>
</html>