-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
130 lines (121 loc) · 4.4 KB
/
index.html
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>菊的三合一收款码</title>
<script>
var setting = {
qqUrl: "https://i.qianbao.qq.com/wallet/sqrcode.htm?m=tenpay&f=wallet&a=1&ac=CAEQ9MGF5wcY87yJhAY%3D_xxx_sign&u=2095145204&n=%E7%BE%A4%E8%81%9A%E4%BB%AC%EF%BC%81%E5%B8%A6%E5%B8%A6%E8%8F%8A%E5%B0%8F%E9%B6%B8",
wechatUrl: "wxp://f2f0rirRwsQH_ChqCBSjD46abB3obH7j-6d7",
aliUrl: "https://qr.alipay.com/tsx099660rrv2j0i8xopgf3",
qrcodeApi:"https://api.pwmqr.com/qrcode/create/?url="
//qrcodeApi: "http://qr.liantu.com/api.php?text="
}
</script>
<style>
* {
margin: 0; padding: 0;
font-family: Microsoft yahei;
}
body {
background-color: #fff;
}
.code-item {
width: 100%;
max-width: 400px;
margin: 0 auto;
padding-bottom: 1px;
display: none;
background-color: #5c92ef;
}
.code-title {
height: 100px;
background-color: #f2f2f2;
background-position: center;
background-repeat: no-repeat;
background-size: 60%;
}
.code-area {
text-align: center;
}
.code-area>img {
margin: 80px 0;
width: 60%;
min-width: 100px;
}
.code-footer {
height: 80px;
text-align: center;
background-color: #fff;
color: #666;
line-height: 40px;
font-size: 20px;
margin: -2px 2px 2px 2px;
}
#code-all>.code-title {
background-image: url("img/money.png");
}
#code-qq {
background-color: #54b4ef;
}
#code-qq>.code-title {
background-image: url("img/money.png");
}
#code-wechat {
background-color: #54bc6e;
}
#code-wechat>.code-title {
background-image: url("img/money.png");
}
.money {
height: 80px;
text-align: center;
line-height: 180px;
font-size: 18px;
margin: -2px 2px 2px 2px;
}
</style>
</head>
<body>
<div class="code-item" id="code-all">
<div class="code-title"><div class="money">本二维码支持以上APP向我付款</div></div>
<div class="code-area">
<img id="page-url" src="img/money.png">
</div>
<div class="code-footer">扫描或长按以上二维码向我付款<br />Copyright © 2018 <a href="https://github.com/ifwlzs" style="text-decoration:none;color:#339999" target="_blank">IFWLZS</a></div>
</div>
<div class="code-item" id="code-qq">
<div class="code-title"><div class="money">本二维码支持以上APP向我付款</div></div>
<div class="code-area">
<img id="qq-url" src="img/money.png">
</div>
<div class="code-footer">扫描或长按以上二维码向我付款<br />Copyright © 2018 <a href="https://github.com/ifwlzs" style="text-decoration:none;color:#339999" target="_blank">IFWLZS</a></div>
</div>
<div class="code-item" id="code-wechat">
<div class="code-title"><div class="money">本二维码支持以上APP向我付款</div></div>
<div class="code-area">
<img id="wechat-url" src="img/money.png">
</div>
<div class="code-footer">扫描或长按以上二维码向我付款<br />Copyright © 2018 <a href="https://github.com/ifwlzs" style="text-decoration:none;color:#339999" target="_blank">IFWLZS</a></div>
</div>
<script>
if(navigator.userAgent.match(/Alipay/i)) {
window.location.href = setting.aliUrl;
} else if(navigator.userAgent.match(/MicroMessenger\//i)) {
document.getElementById("wechat-url").src = setting.qrcodeApi + urlEncode(setting.wechatUrl);
document.getElementById("code-wechat").style.display = "block";
} else if(navigator.userAgent.match(/QQ\//i)) {
document.getElementById("qq-url").src = setting.qrcodeApi + urlEncode(setting.qqUrl);
document.getElementById("code-qq").style.display = "block";
} else {
document.getElementById("page-url").src = setting.qrcodeApi + urlEncode(window.location.href);
document.getElementById("code-all").style.display = "block";
}
function urlEncode(String) {
return encodeURIComponent(String).replace(/'/g,"%27").replace(/"/g,"%22");
}
</script>
</body>
</html>