This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
callback.html
123 lines (104 loc) · 4.18 KB
/
callback.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
<html>
<head>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/ripples.min.css" rel="stylesheet">
<link href="/css/material-wfont.min.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
<title>Wi支付</title>
<meta charset="utf-8">
</head>
<body>
<div id="header"></div>
<div class="content">
<div id="loaderImage" class="loading"></div>
<script type="text/javascript">
var cSpeed = 7;
var cWidth = 120;
var cHeight = 128;
var cTotalFrames = 29;
var cFrameWidth = 120;
var cImageSrc = 'images/sprites.png';
var cImageTimeout = false;
var cIndex = 0;
var cXpos = 0;
var cPreloaderTimeout = false;
var SECONDS_BETWEEN_FRAMES = 0;
function startAnimation() {
document.getElementById('loaderImage').style.backgroundImage = 'url(' + cImageSrc + ')';
document.getElementById('loaderImage').style.width = cWidth + 'px';
document.getElementById('loaderImage').style.height = cHeight + 'px';
//FPS = Math.round(100/(maxSpeed+2-speed));
FPS = Math.round(100 / cSpeed);
SECONDS_BETWEEN_FRAMES = 1 / FPS;
cPreloaderTimeout = setTimeout('continueAnimation()', SECONDS_BETWEEN_FRAMES / 1000);
}
function continueAnimation() {
cXpos += cFrameWidth;
//increase the index so we know which frame of our animation we are currently on
cIndex += 1;
//if our cIndex is higher than our total number of frames, we're at the end and should restart
if (cIndex >= cTotalFrames) {
cXpos = 0;
cIndex = 0;
}
if (document.getElementById('loaderImage'))
document.getElementById('loaderImage').style.backgroundPosition = (-cXpos) + 'px 0';
cPreloaderTimeout = setTimeout('continueAnimation()', SECONDS_BETWEEN_FRAMES * 1000);
}
function stopAnimation() { //stops animation
clearTimeout(cPreloaderTimeout);
cPreloaderTimeout = false;
}
function imageLoader(s, fun) //Pre-loads the sprites image
{
clearTimeout(cImageTimeout);
cImageTimeout = 0;
genImage = new Image();
genImage.onload = function() {
cImageTimeout = setTimeout(fun, 0)
};
genImage.onerror = new Function('alert(\'Could not load the image\')');
genImage.src = s;
}
//The following code starts the animation
new imageLoader(cImageSrc, 'startAnimation()');
</script>
<div id="loading-content">
<h0 id="realname" class="no-new-line"></h0>
<p class="no-new-line">
<span class="label label-success" class="no-new-line">已使用WiAuth通过认证</span>
<span id="account" class="label label-material-orange no-new-line"></span>
<span id="identity" class="label label-material-purple no-new-line"></span>
</p>
<p>
<h3 class="no-new-line">余额</h3>
<h1 class="no-new-line">100.00元</h1>
</p>
</div>
</div>
<div id="footer"></div>
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="/js/ripples.min.js"></script>
<script src="/js/material.min.js"></script>
<script src="/js/init.js"></script>
<script>
var token = Request('token');
var usmid;
$('#loading-content').hide();
$.get('http://wiauth.hackerchai.com/api/user/current/token=' + token, {}, function(data) {
$('#account').html(data.data.account);
$.get('http://wiauth.hackerchai.com/api/user/list/account=' + data.data.account + '&token=' + token, {}, function(user) {
var iccid = user.data.items[0].iccid;
$.get('http://wiauth.hackerchai.com/api/identity/list/iccid=' + iccid, function(id) {
$('#identity').html(id.data.items[0].identity.substring(0, 14) + '****');
$('#realname').html(id.data.items[0].name);
$('#loaderImage').fadeOut();
$('#loading-content').fadeIn();
}, 'json');
}, 'json');
}, 'json');
</script>
</body>
</html>