-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.html
35 lines (31 loc) · 1016 Bytes
/
index2.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="/js/jquery.min.js" type="text/javascript"></script>
<script src="https://rawgit.com/emn178/js-sha1/master/build/sha1.min.js"></script>
<title>调用apicloud后端</title>
</head>
<body>
<h2>调用apicloud后端</h2>
<div id="data"></div>
<script>
var now = Date.now();
var appKey = sha1("A6067856527384"+"UZ"+"D0588DC0-4FA1-F9E5-7BD7-E97450CC40B7"+"UZ"+now)+"."+now;
$.ajax({
"url": "https://d.apicloud.com/mcm/api/comment?filter=%7B%22where%22%3A%7B%7D%2C%22skip%22%3A0%2C%22limit%22%3A20%7D",
"cache": false,
"headers": {
"X-APICloud-AppId": "A6067856527384",
"X-APICloud-AppKey": appKey
},
"type": "GET"
}).success(function(data, status, header) {
console.log(data, status, header);
$('#data').text(JSON.stringify(data));
}).fail(function(header, status, errorThrown) {
console.err(errorThrown);
})
</script>
</body>
</html>