-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (44 loc) · 1.04 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>sendjs</title>
<style>
.wrapper{
text-align: center;
}
</style>
</head>
<body>
<div class="wrapper">
<h1>sendjs is http request</h1>
<h3>sendjs app</h3>
<div id="api"></div>
<h3>sendjs returned value</h3>
<div id="res"></div>
</div>
<script src="./dist/sendjs.js"></script>
<script>
sendjs.create({
baseUrl: 'http://192.168.9.86:8006/partner/',
data: {
ve: 2,
clientType: 'html',
module: 'portal',
service: 'Portal',
method: 'access',
ms: new Date().getTime()
}
});
document.getElementById("api").innerHTML = JSON.stringify(Object.keys(sendjs));
sendjs.post('data', {
age: 24,
name: 'sendjs',
}).then(res => {
document.getElementById("res").innerHTML = JSON.stringify(res);
});
</script>
</body>
</html>