-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
135 lines (134 loc) · 3.85 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
131
132
133
134
135
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link
rel="shortcut icon"
href="https://static-index-4gtuqm3bfa95c963-1304825656.tcloudbaseapp.com/official-website/favicon.svg"
mce_href="https://static-index-4gtuqm3bfa95c963-1304825656.tcloudbaseapp.com/official-website/favicon.svg"
type="image/x-icon"
/>
<meta name="viewport" content="width=650,user-scalable=no" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<title>欢迎使用微信云托管</title>
<style>
.title-logo {
height: 80px;
}
.container {
margin-top: 100px;
}
.count-button {
width: 132px;
box-sizing: border-box;
margin: 16px 8px;
}
.count-number {
font-size: 18px;
font-weight: bolder;
margin: 0 8px;
}
.count-text {
width: 280px;
display: flex;
margin: 0 auto;
text-align: left;
height: 40px;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 4px;
line-height: 40px;
padding: 0 12px;
}
.quote {
font-size: 12px;
}
.qrcode {
height: 180px;
display: block;
margin: 0 auto;
}
.title {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
</style>
</head>
<body>
<div class="container">
<div class="title">
<img
class="title-logo"
src="https://static-index-4gtuqm3bfa95c963-1304825656.tcloudbaseapp.com/official-website/favicon.svg"
/>
<h1 style="display: inline; margin-bottom: 48px">欢迎使用微信云托管</h1>
</div>
<div style="text-align: center">
<p class="count-text">当前计数:<span class="count-number"></span></p>
<div
style="display: flex; justify-content: center; margin-bottom: 80px"
>
<a
class="btn btn-success btn-lg count-button"
style="background: #07c160; border: 0"
onclick="set('inc')"
>计数+1</a
>
<a
class="btn btn-outline-success btn-lg count-button"
style="background: rgba(0, 0, 0, 0.03); color: #07c160; border: 0"
onclick="set('clear')"
>清零</a
>
</div>
<small
class="text-black-50"
style="display: flex; justify-content: center; margin-bottom: 16px"
>扫码加入微信云托管用户群</small
>
<img
class="qrcode middle"
src="https://qcloudimg.tencent-cloud.cn/raw/89b46988d3cd73d8a56e76a1b82bb377.png"
/>
</div>
</div>
</body>
<script src="https://mat1.gtimg.com/www/asset/lib/jquery/jquery/jquery-1.11.1.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
<script>
init();
function init() {
$.ajax("/api/count", {
method: "get",
}).done(function (res) {
if (res && res.data !== undefined) {
$(".count-number").html(res.data);
}
});
}
function set(action) {
$.ajax("/api/count", {
method: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify({
action: action,
}),
}).done(function (res) {
if (res && res.data !== undefined) {
$(".count-number").html(res.data);
}
});
}
</script>
</html>