-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
571 lines (501 loc) · 14.4 KB
/
Copy pathindex.html
File metadata and controls
571 lines (501 loc) · 14.4 KB
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AG工作室 - 智能考勤</title>
<style>
:root {
--bg: #f4f7fb;
--panel: #ffffff;
--ink: #162033;
--muted: #657184;
--line: #dfe6ef;
--primary: #3267d6;
--primary-dark: #204da6;
--teal: #0f9f9a;
--amber: #d97706;
--green: #16855a;
--shadow: 0 24px 70px rgba(22, 32, 51, 0.16);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
min-height: 100vh;
background:
linear-gradient(135deg, rgba(50, 103, 214, 0.12), rgba(15, 159, 154, 0.12)),
var(--bg);
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
line-height: 1.5;
padding: 32px;
}
.page {
width: min(1120px, 100%);
min-height: calc(100vh - 64px);
margin: 0 auto;
display: grid;
grid-template-columns: minmax(0, 1.15fr) 430px;
align-items: center;
gap: 28px;
}
.story-panel,
.login-panel {
background: rgba(255, 255, 255, 0.92);
border: 1px solid rgba(223, 230, 239, 0.9);
box-shadow: var(--shadow);
}
.story-panel {
min-height: 640px;
border-radius: 28px;
padding: 42px;
display: flex;
flex-direction: column;
justify-content: space-between;
overflow: hidden;
}
.brand-mark {
display: inline-flex;
align-items: center;
gap: 10px;
color: var(--primary-dark);
font-weight: 800;
letter-spacing: 0;
margin-bottom: 28px;
}
.brand-dot {
width: 34px;
height: 34px;
border-radius: 10px;
display: grid;
place-items: center;
background: #e8f1ff;
color: var(--primary);
font-weight: 900;
}
h1 {
max-width: 700px;
font-size: 52px;
line-height: 1.06;
letter-spacing: 0;
margin-bottom: 18px;
}
.lead {
max-width: 640px;
color: var(--muted);
font-size: 18px;
}
.trust-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
margin: 34px 0;
}
.trust-item {
border: 1px solid var(--line);
border-radius: 12px;
padding: 14px;
background: #fbfdff;
}
.trust-value {
display: block;
font-size: 22px;
font-weight: 800;
color: var(--ink);
}
.trust-label {
display: block;
margin-top: 4px;
color: var(--muted);
font-size: 13px;
}
.sponsor-box {
border: 1px solid #f3d7a8;
border-radius: 18px;
background: #fff8ec;
padding: 22px;
}
.sponsor-head {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 20px;
}
.sponsor-title {
font-size: 20px;
font-weight: 800;
color: #7c3f00;
margin-bottom: 6px;
}
.sponsor-copy {
color: #744a16;
font-size: 14px;
}
.sponsor-actions {
display: flex;
gap: 10px;
margin-top: 18px;
flex-wrap: wrap;
}
.sponsor-btn,
.ghost-btn {
border: 0;
border-radius: 10px;
padding: 11px 15px;
font-weight: 700;
cursor: pointer;
transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
white-space: nowrap;
}
.sponsor-btn {
background: var(--amber);
color: #fff;
box-shadow: 0 12px 24px rgba(217, 119, 6, 0.22);
}
.ghost-btn {
background: #fff;
color: #744a16;
border: 1px solid #efc982;
}
.sponsor-btn:hover,
.ghost-btn:hover {
transform: translateY(-1px);
}
.qr-grid {
display: none;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
margin-top: 18px;
}
.qr-grid.show { display: grid; }
.qr-card {
background: #fff;
border: 1px solid #f0d9ad;
border-radius: 14px;
padding: 14px;
text-align: center;
}
.qr-card img {
width: 132px;
height: 132px;
object-fit: contain;
border-radius: 10px;
background: #fff;
}
.qr-card strong {
display: block;
margin-top: 10px;
color: #7c3f00;
}
.login-panel {
border-radius: 24px;
padding: 34px;
}
.login-kicker {
color: var(--teal);
font-size: 13px;
font-weight: 800;
margin-bottom: 10px;
}
.login-panel h2 {
font-size: 30px;
letter-spacing: 0;
margin-bottom: 8px;
}
.login-note {
color: var(--muted);
font-size: 14px;
margin-bottom: 24px;
}
.input-group {
margin-bottom: 18px;
}
.input-group label {
display: block;
margin-bottom: 8px;
color: #334155;
font-weight: 700;
font-size: 14px;
}
.input-group input {
width: 100%;
height: 50px;
padding: 0 15px;
border: 1px solid #cfd9e6;
border-radius: 10px;
color: var(--ink);
font-size: 16px;
outline: none;
transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
background: #fbfdff;
}
.input-group input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 4px rgba(50, 103, 214, 0.12);
background: #fff;
}
.login-btn {
width: 100%;
min-height: 52px;
border: 0;
border-radius: 12px;
background: linear-gradient(135deg, var(--primary), var(--teal));
color: white;
font-size: 17px;
font-weight: 800;
cursor: pointer;
transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
box-shadow: 0 16px 34px rgba(50, 103, 214, 0.26);
}
.login-btn:hover {
transform: translateY(-1px);
box-shadow: 0 20px 42px rgba(50, 103, 214, 0.3);
}
.login-btn:disabled {
opacity: 0.65;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.benefit-list {
margin: 22px 0 0;
display: grid;
gap: 10px;
}
.benefit-item {
display: flex;
align-items: flex-start;
gap: 10px;
color: var(--muted);
font-size: 14px;
}
.check {
flex: 0 0 20px;
width: 20px;
height: 20px;
border-radius: 50%;
display: grid;
place-items: center;
background: #e9f8f3;
color: var(--green);
font-size: 13px;
font-weight: 900;
margin-top: 1px;
}
.support-strip {
margin-top: 22px;
border-radius: 14px;
padding: 14px;
background: #f8fafc;
border: 1px solid var(--line);
color: var(--muted);
font-size: 13px;
}
.support-strip strong {
color: var(--ink);
}
.toast {
position: fixed;
left: 50%;
bottom: 24px;
transform: translateX(-50%);
background: #162033;
color: #fff;
padding: 12px 18px;
border-radius: 10px;
z-index: 100;
display: none;
box-shadow: 0 14px 34px rgba(22, 32, 51, 0.22);
font-size: 14px;
}
.toast.show { display: block; }
.toast.error { background: #b91c1c; }
@media (max-width: 980px) {
body { padding: 20px; }
.page {
min-height: auto;
grid-template-columns: 1fr;
}
.story-panel { min-height: auto; padding: 30px; order: 2; }
.login-panel { order: 1; }
h1 { font-size: 38px; }
.trust-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
body { padding: 14px; }
.story-panel,
.login-panel {
border-radius: 18px;
padding: 22px;
}
h1 { font-size: 31px; }
.lead { font-size: 16px; }
.login-panel h2 { font-size: 26px; }
.sponsor-head { display: block; }
.sponsor-actions { display: grid; grid-template-columns: 1fr; }
.qr-grid { grid-template-columns: 1fr; }
.qr-card img { width: 150px; height: 150px; }
}
</style>
</head>
<body>
<main class="page">
<section class="story-panel" aria-label="服务介绍与赞助">
<div>
<div class="brand-mark">
<span class="brand-dot">AG</span>
<span>AG工作室 出品</span>
</div>
<h1>把晚点名和签到,交给一个更稳的提醒系统。</h1>
<p class="lead">
智能考勤帮你保存签到任务、自动执行、记录结果。少一次临时慌张,多一点稳定和安心。
</p>
<div class="trust-row" aria-label="服务亮点">
<div class="trust-item">
<span class="trust-value">30 秒</span>
<span class="trust-label">学号登录,无需注册流程</span>
</div>
<div class="trust-item">
<span class="trust-value">21:25</span>
<span class="trust-label">默认晚寝签到时间</span>
</div>
<div class="trust-item">
<span class="trust-value">邮件</span>
<span class="trust-label">VIP 可接收签到结果通知</span>
</div>
</div>
</div>
<div class="sponsor-box">
<div class="sponsor-head">
<div>
<div class="sponsor-title">喜欢这个工具?赞助能直接提升稳定性。</div>
<p class="sponsor-copy">
服务器、数据库和域名都需要持续成本。赞助不是强制付费,而是让自动签到服务能更久、更稳地跑下去。
</p>
</div>
</div>
<div class="sponsor-actions">
<button class="sponsor-btn" type="button" onclick="toggleSponsor()">查看赞助码</button>
<button class="ghost-btn" type="button" onclick="focusLogin()">先登录使用</button>
</div>
<div class="qr-grid" id="sponsorQr">
<div class="qr-card">
<img src="https://login.agai.online/vxcode.png" alt="微信赞助收款码">
<strong>微信赞助</strong>
</div>
<div class="qr-card">
<img src="https://login.agai.online/zfbcode.png" alt="支付宝赞助收款码">
<strong>支付宝赞助</strong>
</div>
</div>
</div>
</section>
<section class="login-panel" aria-label="登录">
<div class="login-kicker">立即进入控制面板</div>
<h2>登录智能考勤</h2>
<p class="login-note">输入学号和考勤系统密码,登录后即可管理自动签到任务。</p>
<div class="input-group">
<label for="studentId">学号</label>
<input type="text" id="studentId" placeholder="请输入学号" autocomplete="username">
</div>
<div class="input-group">
<label for="password">考勤系统密码</label>
<input type="password" id="password" placeholder="默认 Ahgydx@920" value="Ahgydx@920" autocomplete="current-password">
</div>
<button class="login-btn" id="loginBtn" type="button" onclick="login()">登录并进入仪表盘</button>
<div class="benefit-list">
<div class="benefit-item">
<span class="check">✓</span>
<span>登录后可创建工作日、每天或自定义星期的签到任务。</span>
</div>
<div class="benefit-item">
<span class="check">✓</span>
<span>可以查看最近签到记录,快速发现失败原因。</span>
</div>
<div class="benefit-item">
<span class="check">✓</span>
<span>绑定邮箱可获得 VIP 体验,并接收结果通知。</span>
</div>
</div>
<div class="support-strip">
<strong>赞助建议:</strong>如果它帮你省过一次签到焦虑,随缘支持一点,就能帮服务多撑很久。
</div>
</section>
</main>
<div class="toast" id="toast" role="status"></div>
<script>
const API_BASE = 'https://api.agai.online/api';
let toastTimer = null;
function showToast(message, type = '') {
const toast = document.getElementById('toast');
toast.textContent = message;
toast.className = `toast show ${type}`.trim();
clearTimeout(toastTimer);
toastTimer = setTimeout(() => {
toast.className = 'toast';
}, 3000);
}
function toggleSponsor() {
document.getElementById('sponsorQr').classList.toggle('show');
}
function focusLogin() {
document.getElementById('studentId').focus();
}
async function login() {
const studentId = document.getElementById('studentId').value.trim();
const password = document.getElementById('password').value.trim();
const btn = document.getElementById('loginBtn');
if (!studentId) {
showToast('请输入学号', 'error');
focusLogin();
return;
}
btn.disabled = true;
btn.textContent = '正在验证...';
try {
const res = await fetch(`${API_BASE}/login`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
studentId,
attendancePassword: password || 'Ahgydx@920'
})
});
const data = await res.json();
if (data.success) {
localStorage.setItem('token', data.token);
localStorage.setItem('user', JSON.stringify(data.user));
localStorage.setItem('attendancePassword', password || 'Ahgydx@920');
window.location.href = '/dashboard';
} else {
showToast(data.message || '登录失败,请检查后重试', 'error');
}
} catch (error) {
showToast('网络错误,请稍后重试', 'error');
} finally {
btn.disabled = false;
btn.textContent = '登录并进入仪表盘';
}
}
document.getElementById('studentId').addEventListener('keypress', (e) => {
if (e.key === 'Enter') login();
});
document.getElementById('password').addEventListener('keypress', (e) => {
if (e.key === 'Enter') login();
});
(function checkLoginStatus() {
const token = localStorage.getItem('token');
if (!token) return;
fetch(`${API_BASE}/user/profile`, {
headers: { 'Authorization': `Bearer ${token}` }
})
.then(res => res.json())
.then(data => {
if (data.success) {
window.location.href = '/dashboard';
}
})
.catch(() => {});
})();
</script>
</body>
</html>