-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwetip.html
More file actions
81 lines (76 loc) · 2.66 KB
/
Copy pathwetip.html
File metadata and controls
81 lines (76 loc) · 2.66 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>下载app</title>
<style type="text/css">
a{display: inline-block; background: #61B3E6; color:#fff; padding: 0 10px; border-radius: 4px; text-align: center; margin: 0 5px; line-height: 22px; font-size: 14px; text-decoration: none;}
a.btn-warn{background: #F0AD4E;}
a:hover{opacity: 0.8;}
.wxtip {
background: rgba(0, 0, 0, 0.8);
text-align: center;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 998;
display: none;
}
.wxtip-icon {
width: 52px;
height: 67px;
background: url(http://img.caibaojian.com/uploads/2016/01/weixin-tip.png) no-repeat;
display: block;
position: absolute;
right: 20px;
top: 20px;
}
.wxtip-txt {
margin-top: 107px;
color: #fff;
font-size: 16px;
line-height: 1.5;
}
</style>
</head>
<body>
<a href="http://caibaojian.com/test.apk" id="JdownApp">点击下载APP</a>
<a href="http://caibaojian.com/test.apk" id="JdownApp2" class="btn-warn">点击下载APP</a>
<div class="wxtip" id="JweixinTip">
<span class="wxtip-icon"></span>
<p class="wxtip-txt">点击右上角<br/>选择在浏览器中打开</p>
</div>
<script>
function weixinTip(ele){
var ua = navigator.userAgent;
var isWeixin = !!/MicroMessenger/i.test(ua);
if(isWeixin){
ele.onclick=function(e){
window.event? window.event.returnValue = false : e.preventDefault();
document.getElementById('JweixinTip').style.display='block';
}
document.getElementById('JweixinTip').onclick=function(){
this.style.display='none';
}
}
}
var btn1 = document.getElementById('JdownApp');//下载一
weixinTip(btn1);
var btn2 = document.getElementById('JdownApp2'); //下载二
weixinTip(btn2);
function download() {
var isiOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if (isiOS) {
window.location.href = "itms-services://?action=download-manifest&url=https://raw.githubusercontent.com/yanxiaojun617/ionic2_tabs/master/app.plist";
} else {
window.location.href = "http://116.6.64.111:15001/siteweb2.apk";
}
}
//http://88.128.18.144:7777/app/eguardian/downloadSales
//http://www.xmesm.cn/
</script>
</body>
</html>