-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (59 loc) · 1.84 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CheeseburgerIM - VClass</title>
<link rel="icon" type="image/png" href="https://gitee.com/CheeseburgerIM/imagehosting/raw/master/Image/Home/Web_icon.jpg" />
<script src="https://cdn.bootcss.com/jquery/2.1.0/jquery.min.js"></script>
</head>
<style>
button,a {
display: block;
margin: 7px;
}
</style>
<body>
<a href="https://gitee.com/CheeseburgerIM/idea-on-pc/pages" target="_blank">更新页面</a>
<button onclick="login()">用户登录</button>
<button onclick="getInfo()">获取个人信息</button>
<button onclick="updateInfo()">更新个人信息</button>
</body>
<script>
function login() {
var url="https://vclass.api.cheeseburgerim.space/user/api/login?username=panyizhe&password=1234567"
fetch(url,{
method:'get',
credentials:"include"
})
.then((res)=>res.text())
.then((data)=>{
console.log("login")
console.log(data)
});
}
function getInfo() {
var url="https://vclass.api.cheeseburgerim.space/user/api/getInfo?username=panyizhe"
fetch(url,{
method:'get',
credentials:"include"
})
.then((res)=>res.json())
.then((data)=>{
console.log("getInfo")
console.log(data)
});
}
function updateInfo() {
var url="https://vclass.api.cheeseburgerim.space/user/api/updateInfo?username=panyizhe&link=cheeseburgerim.space&grade=2019&address=天津大学&status=同学&name=CheeseburgerIM&subtitle=IMF"
fetch(url,{
method:'get',
credentials:"include"
})
.then((res)=>res.text())
.then((data)=>{
console.log("getInfo")
console.log(data)
});
}
</script>
</html>