-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin.html
More file actions
2156 lines (1925 loc) · 106 KB
/
Copy pathadmin.html
File metadata and controls
2156 lines (1925 loc) · 106 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
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>APIRank 商家后台 - 智能中转站推荐</title>
<meta name="description" content="API中转站商家后台管理,提交站点、管理信息。">
<meta name="keywords" content="AI API中转站,API排行榜,商家后台,站点管理">
<meta name="theme-color" content="#F5F7FA">
<meta name="robots" content="noindex, follow">
<meta property="og:type" content="website">
<meta property="og:title" content="商家后台 - API排行榜">
<meta property="og:description" content="API中转站商家后台管理,提交站点、管理信息。">
<meta property="og:url" content="https://api-rank-lake.vercel.app/admin.html">
<meta property="og:site_name" content="AI API中转站排行榜">
<meta property="og:image" content="https://api-rank-lake.vercel.app/favicon.jpg">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="商家后台 - API排行榜">
<meta name="twitter:description" content="API中转站商家后台管理,提交站点、管理信息。">
<link rel="canonical" href="https://api-rank-lake.vercel.app/admin.html">
<link rel="icon" type="image/jpeg" href="favicon.jpg">
<link rel="apple-touch-icon" href="favicon.jpg">
<link rel="manifest" href="manifest.json">
<style>
:root {
--bg-primary: #F5F7FA;
--bg-secondary: #FFFFFF;
--bg-card: #FFFFFF;
--bg-card-hover: #F0F4F8;
--bg-hover: rgba(74, 144, 217, 0.06);
--border: rgba(0, 0, 0, 0.08);
--border-hover: rgba(0, 0, 0, 0.15);
--text-primary: #1A1A2E;
--text-secondary: #6B7280;
--text-muted: #9CA3AF;
--accent: #4A90D9;
--accent-light: #7EC8E3;
--accent-glow: rgba(74, 144, 217, 0.2);
--green: #10B981;
--green-glow: rgba(16, 185, 129, 0.15);
--yellow: #F59E0B;
--red: #EF4444;
--orange: #F97316;
--danger: #ef4444;
--warning: #f59e0b;
--radius: 12px;
--gradient-1: #4A90D9;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; }
/* ===== Navbar ===== */
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
padding: 16px 0;
background: rgba(255,255,255,0.85);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border);
transition: all 0.3s ease;
}
.navbar .container {
display: flex;
align-items: center;
justify-content: space-between;
}
.logo {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: var(--text-primary);
}
.logo-icon {
width: 36px;
height: 36px;
background: var(--accent);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 16px;
color: white;
}
.logo-text {
font-weight: 700;
font-size: 18px;
letter-spacing: -0.5px;
}
.logo-text span {
color: var(--accent-light);
}
.nav-links {
display: flex;
align-items: center;
gap: 32px;
list-style: none;
}
.nav-links a {
color: var(--text-primary);
text-decoration: none;
font-size: 14px;
font-weight: 500;
transition: color 0.2s;
}
.nav-links a:hover {
color: var(--text-primary);
}
.nav-badge {
background: rgba(74, 144, 217, 0.1);
color: var(--accent);
padding: 4px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
}
.mobile-menu-btn {
display: none;
}
/* ===== Footer ===== */
.footer {
padding: 40px 0;
border-top: 1px solid var(--border);
margin-top: 40px;
}
.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
}
.footer-text {
font-size: 13px;
color: var(--text-muted);
}
.footer-links {
display: flex;
gap: 24px;
}
.footer-links a {
font-size: 13px;
color: var(--text-muted);
text-decoration: none;
transition: color 0.2s;
}
.footer-links a:hover {
color: var(--text-secondary);
}
@media (max-width: 768px) {
.nav-links { display: none; }
.mobile-menu-btn {
display: flex;
flex-direction: column;
gap: 5px;
background: none;
border: none;
cursor: pointer;
padding: 8px;
z-index: 200;
}
.mobile-menu-btn span {
display: block;
width: 22px;
height: 2px;
background: var(--text-primary);
border-radius: 2px;
transition: all 0.3s ease;
}
.mobile-menu-btn.active span:nth-child(1) {
transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
transform: rotate(-45deg) translate(5px, -5px);
}
.nav-links.mobile-open {
display: flex !important;
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100vw !important;
height: 100vh !important;
background: rgba(245, 247, 250, 0.98) !important;
backdrop-filter: blur(20px) !important;
flex-direction: column !important;
align-items: center !important;
justify-content: center !important;
gap: 20px !important;
z-index: 9999 !important;
padding: 80px 24px 40px !important;
animation: fadeIn 0.2s ease;
visibility: visible !important;
opacity: 1 !important;
}
.nav-links.mobile-open li {
list-style: none !important;
width: 100% !important;
max-width: 280px !important;
display: block !important;
visibility: visible !important;
opacity: 1 !important;
}
.nav-links.mobile-open a,
.nav-links.mobile-open .nav-badge {
font-size: 17px !important;
color: var(--text-primary) !important;
text-decoration: none !important;
padding: 14px 24px !important;
display: block !important;
text-align: center !important;
border-radius: 12px !important;
transition: background 0.2s !important;
width: 100% !important;
visibility: visible !important;
opacity: 1 !important;
}
.nav-links.mobile-open a:hover,
.nav-links.mobile-open a:active {
background: rgba(74, 144, 217, 0.12) !important;
}
.nav-links.mobile-open .nav-badge {
font-size: 13px !important;
margin-top: 8px !important;
background: rgba(74,144,217,0.12) !important;
color: var(--accent) !important;
padding: 8px 16px !important;
border-radius: 20px !important;
text-align: center !important;
}
.footer-content {
flex-direction: column;
text-align: center;
}
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 48px; width: 420px; }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-icon { width: 56px; height: 56px; background: #4A90D9, var(--green)); border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.form-group input { width: 100%; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 14px; }
.login-btn { width: 100%; padding: 12px; background: #4A90D9, #5a4bd4); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
.login-error { color: var(--danger); font-size: 13px; text-align: center; margin-top: 12px; }
.dashboard { display: none; }
.dashboard.active { display: block; }
.topbar { background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 0 32px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo { width: 36px; height: 36px; background: #4A90D9, var(--green)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.logout-btn { padding: 6px 16px; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 13px; cursor: pointer; }
.main-content { padding: 32px; max-width: 1400px; margin: 0 auto; }
.tab-nav { display: flex; gap: 8px; margin-bottom: 24px; }
.tab-btn { padding: 10px 20px; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 14px; cursor: pointer; }
.tab-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-btn .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; background: var(--danger); border-radius: 10px; font-size: 11px; margin-left: 6px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.panel-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.quick-tag { padding: 6px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 20px; color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: all 0.2s; user-select: none; }
.quick-tag:hover { border-color: var(--accent); color: var(--accent); }
.quick-tag.active { background: rgba(108,92,231,0.15); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.quick-tag-clear { padding: 6px 14px; background: transparent; border: 1px dashed var(--border); border-radius: 20px; color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all 0.2s; }
.quick-tag-clear:hover { border-color: var(--danger); color: var(--danger); }
.customer-textarea { width: 100%; min-height: 180px; padding: 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 14px; resize: vertical; }
.parse-actions { display: flex; gap: 12px; margin-top: 16px; }
.btn-primary { flex: 1; padding: 12px 24px; background: #4A90D9, #5a4bd4); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-secondary { padding: 12px 20px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 14px; cursor: pointer; }
.results-placeholder { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.station-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s; }
.station-card:hover { border-color: var(--accent); }
.station-card.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(0,210,160,0.2); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-rank { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-right: 10px; }
.rank-1 { background: #4A90D9; color: #000; }
.rank-2 { background: #4A90D9; color: #fff; }
.rank-3 { background: #4A90D9; color: #fff; }
.card-name { font-size: 15px; font-weight: 600; flex: 1; }
.card-score { font-size: 18px; font-weight: 700; color: var(--green); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.meta-item { font-size: 11px; padding: 2px 8px; background: rgba(255,255,255,0.05); border-radius: 4px; color: var(--text-secondary); }
.scene-tag { background: rgba(108,92,231,0.12); color: var(--accent); }
.card-reasons { margin: 8px 0; padding: 8px 10px; background: rgba(0,210,160,0.06); border-left: 3px solid var(--green); border-radius: 0 6px 6px 0; }
.card-reason-item { font-size: 12px; color: var(--text-secondary); line-height: 1.8; }
.card-reason-item::before { content: '✓ '; color: var(--green); font-weight: 600; }
.card-scenes { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.card-scenes-label { font-size: 12px; color: var(--text-muted); }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn-report { flex: 1; padding: 8px 16px; background: rgba(0,210,160,0.1); border: 1px solid rgba(0,210,160,0.3); border-radius: 6px; color: var(--green); font-size: 12px; cursor: pointer; }
.btn-compare { padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; color: var(--text-secondary); font-size: 12px; cursor: pointer; }
.btn-compare.active { background: rgba(108,92,231,0.2); border-color: var(--accent); color: var(--accent); }
.compare-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-card); border-top: 1px solid var(--border); padding: 16px 32px; z-index: 50; }
.compare-bar.active { display: flex; align-items: center; justify-content: space-between; }
.compare-info { display: flex; align-items: center; gap: 16px; }
.compare-count { font-size: 14px; color: var(--text-secondary); }
.compare-count span { color: var(--green); font-weight: 600; }
.btn-compare-now { padding: 10px 24px; background: var(--accent); border: none; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.review-stats { display: flex; gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; flex: 1; text-align: center; }
.stat-card .number { font-size: 32px; font-weight: 700; }
.stat-card .label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.review-section { margin-bottom: 32px; }
.review-section-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.review-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.review-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.review-item-name { font-size: 15px; font-weight: 600; }
.review-item-time { font-size: 12px; color: var(--text-secondary); }
.review-item-url { font-size: 13px; color: var(--accent); margin-bottom: 6px; }
.review-item-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; padding: 8px 10px; background: rgba(255,255,255,0.02); border-radius: 6px; border: 1px solid rgba(255,255,255,0.04); }
.review-item-models { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tag-model { font-size: 11px; padding: 2px 8px; background: rgba(78,205,196,0.1); color: #4ecdc4; border-radius: 4px; }
.tag-score { font-size: 12px; font-weight: 600; padding: 2px 8px; background: rgba(254,202,87,0.1); color: #feca57; border-radius: 4px; }
.tag-enriched { font-size: 11px; padding: 2px 8px; background: rgba(78,205,196,0.1); color: #4ecdc4; border-radius: 4px; }
.tag-pending { font-size: 11px; padding: 2px 8px; background: rgba(254,202,87,0.1); color: #feca57; border-radius: 4px; }
.review-item-source { display: inline-block; font-size: 11px; padding: 2px 8px; background: rgba(108,92,231,0.15); border-radius: 4px; color: #a78bfa; margin-bottom: 12px; }
.review-actions { display: flex; gap: 8px; }
.btn-approve { padding: 8px 16px; background: rgba(0,210,160,0.15); border: 1px solid rgba(0,210,160,0.3); border-radius: 6px; color: var(--green); font-size: 12px; cursor: pointer; }
.btn-reject { padding: 8px 16px; background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); border-radius: 6px; color: var(--danger); font-size: 12px; cursor: pointer; }
.btn-view { padding: 8px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px; color: var(--text-secondary); font-size: 12px; cursor: pointer; text-decoration: none; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 1000; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; width: 900px; max-width: 95vw; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { width: 32px; height: 32px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 20px; cursor: pointer; }
.modal-body { padding: 24px; }
.report-section { margin-bottom: 28px; }
.report-section-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.best-rec { background: #4A90D9, rgba(108,92,231,0.05)); border: 1px solid rgba(0,210,160,0.3); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; }
.best-rec-icon { width: 48px; height: 48px; background: #4A90D9, #00b890); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.best-rec-info h4 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.best-rec-info p { font-size: 13px; color: var(--text-secondary); }
.best-rec-score { margin-left: auto; text-align: center; }
.best-rec-score .score-num { font-size: 32px; font-weight: 800; color: var(--green); }
.best-rec-score .score-label { font-size: 11px; color: var(--text-secondary); }
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 120px; font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 24px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 11px; font-weight: 600; color: #fff; }
.bar-fill.speed { background: #4A90D9; }
.bar-fill.stability { background: #4A90D9; }
.bar-fill.support { background: #4A90D9; }
.bar-value { width: 30px; text-align: right; font-size: 12px; font-weight: 600; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
.compare-table th { color: var(--text-secondary); font-weight: 500; font-size: 12px; }
.highlight { color: var(--green); font-weight: 700; }
.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.compare-station { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.compare-station.winner { border-color: var(--green); background: rgba(0,210,160,0.05); }
.compare-station-header { text-align: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.compare-station-header h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.compare-station-header .score { font-size: 36px; font-weight: 800; color: var(--green); }
.compare-station-header .score-label { font-size: 12px; color: var(--text-secondary); }
.compare-metrics { display: flex; flex-direction: column; gap: 12px; }
.compare-metric { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.compare-metric-label { font-size: 13px; color: var(--text-secondary); }
.compare-metric-value { font-size: 14px; font-weight: 600; }
.compare-metric-value.high { color: var(--green); }
.compare-metric-value.medium { color: var(--warning); }
.compare-metric-value.low { color: var(--danger); }
.winner-badge { display: inline-block; background: var(--green); color: #000; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; margin-top: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 24px; font-size: 14px; z-index: 9999; opacity: 0; transition: all 0.3s; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
</style>
</head>
<body>
<div class="login-page" id="loginPage">
<div class="login-box">
<div class="login-logo">
<div class="logo-icon">API</div>
<h1>商家后台</h1>
</div>
<div class="form-group">
<label>管理密码</label>
<input type="password" id="passwordInput" placeholder="请输入密码" onkeydown="if(event.key==='Enter')handleLogin()">
</div>
<button class="login-btn" onclick="handleLogin()">登录</button>
<div class="login-error" id="loginError"></div>
</div>
</div>
<div class="dashboard" id="dashboard">
<nav class="navbar">
<div class="container">
<a href="index.html" class="logo">
<div class="logo-icon">A</div>
<div class="logo-text">API<span>排行榜</span></div>
</a>
<button class="mobile-menu-btn" onclick="toggleMobileMenu()" aria-label="菜单">
<span></span><span></span><span></span>
</button>
<ul class="nav-links" id="navLinks">
<li><a href="index.html">首页</a></li>
<li><a href="index.html#ranking">排行榜</a></li>
<li><a href="creative-tools.html">🎨 在线绘图/视频专区</a></li>
<li><a href="javascript:void(0)" onclick="openFinderModal()">🎯 找适合自己的中转站</a></li>
<li><a href="javascript:void(0)" onclick="openSubmitModal()">提交收录</a></li>
<li><a href="index.html#guide">选站指南</a></li>
<li><a href="dead-sites.html">⚠ 失效站点</a></li>
<li><span class="nav-badge">实时更新</span></li>
</ul>
</div>
</nav>
<div class="topbar" style="top: 68px;">
<div class="topbar-left">
<div class="topbar-title">工作台 <span>智能推荐引擎</span></div>
</div>
<div class="topbar-right">
<button class="logout-btn" onclick="handleLogout()">退出登录</button>
</div>
</div>
<div class="main-content" style="padding-top: 100px;">
<div class="tab-nav">
<button class="tab-btn active" onclick="switchTab('recommend')">智能推荐</button>
<button class="tab-btn" onclick="switchTab('review')">
审核管理
<span class="badge" id="totalBadge">0</span>
</button>
<button class="tab-btn" onclick="switchTab('checklog')">检测记录</button>
</div>
<div class="tab-content active" id="tab-recommend">
<div class="workspace">
<div class="panel">
<div class="panel-title">客户需求输入</div>
<div class="quick-tags" id="quickTags">
<span class="quick-tag" onclick="toggleQuickTag(this, '编程开发')">编程开发</span>
<span class="quick-tag" onclick="toggleQuickTag(this, '学术写作')">学术写作</span>
<span class="quick-tag" onclick="toggleQuickTag(this, '图像生成')">图像生成</span>
<span class="quick-tag" onclick="toggleQuickTag(this, '低价优先')">低价优先</span>
<span class="quick-tag" onclick="toggleQuickTag(this, '稳定优先')">稳定优先</span>
<span class="quick-tag" onclick="toggleQuickTag(this, '模型丰富')">模型丰富</span>
<span class="quick-tag" onclick="toggleQuickTag(this, '企业级')">企业级</span>
<span class="quick-tag" onclick="toggleQuickTag(this, '国产模型')">国产模型</span>
<span class="quick-tag-clear" onclick="clearQuickTags()">清空</span>
</div>
<textarea class="customer-textarea" id="customerText" placeholder="粘贴客户发来的文字,或点击上方标签快速选择需求,例如:我要用Claude写代码,预算100块,希望稳定一点"></textarea>
<div class="parse-actions">
<button class="btn-primary" onclick="handleParse()">智能解析</button>
<button class="btn-secondary" onclick="clearAll()">清空</button>
</div>
</div>
<div class="panel">
<div class="panel-title">推荐结果 (点击卡片选择对比)</div>
<div class="results-placeholder" id="resultsPlaceholder">
<p>输入客户需求并点击「智能解析」</p>
</div>
<div id="resultsList"></div>
</div>
</div>
</div>
<div class="tab-content" id="tab-review">
<div class="review-stats">
<div class="stat-card">
<div class="number" id="statCrawler">0</div>
<div class="label">爬虫发现待审核</div>
</div>
<div class="stat-card">
<div class="number" id="statManual">0</div>
<div class="label">手动提交待审核</div>
</div>
<div class="stat-card" style="cursor:pointer;" onclick="exportApprovedSites()" title="点击导出已审核站点">
<div class="number" id="statApproved">0</div>
<div class="label">已通过 (点击导出)</div>
</div>
</div>
<div class="review-section">
<div class="review-section-title">🤖 爬虫自动发现 (来自百度/知乎/抖音/小红书)</div>
<div id="crawlerList"></div>
</div>
<div class="review-section">
<div class="review-section-title">📝 手动提交收录</div>
<div id="manualList"></div>
</div>
<!-- 已拒绝站点管理 -->
<div style="margin-top:24px;">
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;cursor:pointer;" onclick="toggleRejectedSection()">
<h3 style="font-size:15px;font-weight:600;color:var(--text-secondary);">🚫 已拒绝站点 <span id="rejectedToggleIcon" style="font-size:12px;margin-left:4px;">▼</span></h3>
<span id="statRejected" style="font-size:12px;color:var(--danger);background:rgba(239,68,68,0.1);padding:2px 10px;border-radius:10px;">0 个已拒绝</span>
</div>
<div id="rejectedSection" style="display:block;">
<div id="rejectedList" style="display:flex;flex-direction:column;gap:8px;margin-bottom:16px;">
<div style="text-align:center;color:var(--text-muted);padding:20px;font-size:13px;">暂无已拒绝站点</div>
</div>
</div>
</div>
<!-- 失效站点管理 -->
<div style="margin-top:24px;">
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;">
<h3 style="font-size:15px;font-weight:600;color:var(--text-secondary);">⚠️ 失效站点管理</h3>
<div style="display:flex;align-items:center;gap:8px;">
<span id="statDead" style="font-size:12px;color:#ff6b6b;background:rgba(255,107,107,0.1);padding:2px 10px;border-radius:10px;">0 个失效</span>
<span id="statRecovered" style="font-size:12px;color:#4ecdc4;background:rgba(78,205,196,0.1);padding:2px 10px;border-radius:10px;">0 已恢复</span>
</div>
</div>
<div style="display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap;">
<button onclick="checkAllDeadSites()" id="btnCheckAll" style="padding:8px 16px;background: #4A90D9;color:#fff;border:none;border-radius:8px;font-size:12px;cursor:pointer;font-weight:500;">🔍 一键检测全部</button>
<button onclick="exportDeadSitesChanges()" style="padding:8px 16px;background:var(--bg-primary);border:1px solid var(--border);border-radius:8px;font-size:12px;color:var(--text-secondary);cursor:pointer;">📤 导出变更</button>
<button onclick="clearRecoveredSites()" style="padding:8px 16px;background:var(--bg-primary);border:1px solid var(--border);border-radius:8px;font-size:12px;color:var(--text-secondary);cursor:pointer;">🧹 清除已恢复</button>
</div>
<div id="deadCheckProgress" style="display:none;margin-bottom:12px;">
<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px;">
<span style="font-size:12px;color:var(--text-secondary);" id="deadCheckText">正在检测...</span>
<span style="font-size:12px;color:var(--accent);" id="deadCheckCount">0/0</span>
</div>
<div style="height:4px;background:var(--bg-primary);border-radius:2px;overflow:hidden;">
<div id="deadCheckBar" style="height:100%;background: #4A90D9,var(--green));border-radius:2px;width:0%;transition:width 0.3s;"></div>
</div>
</div>
<div id="deadList" style="display:flex;flex-direction:column;gap:8px;">
<div style="text-align:center;color:var(--text-muted);padding:20px;font-size:13px;">暂无失效站点数据,等待爬虫检测...</div>
</div>
</div>
</div>
<!-- 检测记录面板 -->
<div class="tab-content" id="tab-checklog">
<div style="padding:16px;">
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;">
<div>
<h3 style="font-size:15px;font-weight:600;color:var(--text-secondary);">📊 每周检测记录</h3>
<p style="font-size:12px;color:var(--text-muted);margin:4px 0 0;">数据来源:weekly_check.py 自动检测结果</p>
</div>
<div id="checkLogTime" style="font-size:12px;color:var(--accent);background:rgba(108,92,231,0.1);padding:4px 12px;border-radius:8px;">--</div>
</div>
<div id="checkLogSummary" style="display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px;"></div>
<div id="checkLogList" style="display:flex;flex-direction:column;gap:8px;">
<div style="text-align:center;color:var(--text-muted);padding:30px;font-size:13px;">正在加载检测记录...</div>
</div>
</div>
</div>
</div>
</div>
<div class="compare-bar" id="compareBar">
<div class="compare-info">
<span class="compare-count">已选择 <span id="compareCount">0</span>/3 个中转站</span>
</div>
<button class="btn-compare-now" onclick="openCompareModal()">开始对比</button>
</div>
<div class="modal-overlay" id="reportModal" onclick="if(event.target===this)closeReportModal()">
<div class="modal">
<div class="modal-header">
<h3 id="reportTitle">详细分析报告</h3>
<button class="modal-close" onclick="closeReportModal()">×</button>
</div>
<div class="modal-body" id="reportBody"></div>
</div>
</div>
<div class="modal-overlay" id="compareModal" onclick="if(event.target===this)closeCompareModal()">
<div class="modal">
<div class="modal-header">
<h3>中转站对比分析</h3>
<button class="modal-close" onclick="closeCompareModal()">×</button>
</div>
<div class="modal-body" id="compareBody"></div>
</div>
</div>
<script>
const stationDatabase = [
{ name: '诗云API', url: 'shiyunapi.com', models: ['claude','gpt','gemini','domestic'], price: 'low', special: ['cheap'], score: 9.8, stability: 9.5, speed: 9.0, support: 9.5, features: ['多模态','成本减半','无套路'], freeAmount: '新用户送额度' },
{ name: '4ksAPI', url: '4ksapi.com', models: ['claude','gpt','gemini'], price: 'medium', special: ['stable'], score: 9.5, stability: 9.8, speed: 9.2, support: 9.0, features: ['智能路由','对公开票','企业级'], freeAmount: '无免费额度' },
{ name: '星链4SAPI', url: '4sapi.com', models: ['claude','gpt','gemini'], price: 'high', special: ['stable','fast'], score: 9.9, stability: 9.9, speed: 9.8, support: 9.5, features: ['企业级SLA','全场景','增值税发票'], freeAmount: '无免费额度' },
{ name: '硅基流动', url: 'siliconflow.cn', models: ['domestic'], price: 'low', special: ['fast','direct'], score: 8.8, stability: 9.0, speed: 9.5, support: 8.5, features: ['国产模型当天同步','DeepSeek全系','600万用户'], freeAmount: '每日免费额度' },
{ name: 'OpenRouter', url: 'openrouter.ai', models: ['claude','gpt','gemini','domestic'], price: 'medium', special: ['fast'], score: 8.5, stability: 8.5, speed: 9.0, support: 8.0, features: ['多模型聚合','官方价格','无需翻墙'], freeAmount: '新用户$1免费' },
{ name: 'DeepSeek官方', url: 'platform.deepseek.com', models: ['domestic'], price: 'low', special: ['cheap','direct'], score: 9.0, stability: 9.5, speed: 9.5, support: 9.0, features: ['官方API','超低价','DeepSeek全系'], freeAmount: '每月免费额度' },
{ name: 'API2D', url: 'api2d.com', models: ['claude','gpt','gemini'], price: 'medium', special: ['stable'], score: 8.2, stability: 8.5, speed: 8.0, support: 8.5, features: ['多模型','稳定运营','国内直连'], freeAmount: '新用户送额度' }
];
const modelLabels = { claude: 'Claude', gpt: 'GPT', gemini: 'Gemini', domestic: '国产模型' };
const priceLabels = { low: '低价 (50以内)', medium: '中等 (50-200)', high: '高价 (200+)' };
let selectedForCompare = [];
let lastParseResults = [];
function handleLogin() {
const pwd = document.getElementById('passwordInput').value;
// 注意:生产环境应使用服务端验证
const ADMIN_PWD = (typeof __ADMIN_PWD__ !== 'undefined' && __ADMIN_PWD__) || 'apirank2026';
if (pwd === ADMIN_PWD) {
localStorage.setItem('adminLoggedIn', 'true');
localStorage.setItem('adminLoginTime', Date.now().toString());
showDashboard();
} else {
document.getElementById('loginError').textContent = '密码错误';
}
}
function handleLogout() {
localStorage.removeItem('adminLoggedIn');
localStorage.removeItem('adminLoginTime');
document.getElementById('dashboard').classList.remove('active');
document.getElementById('loginPage').style.display = 'flex';
}
function showDashboard() {
document.getElementById('loginPage').style.display = 'none';
document.getElementById('dashboard').classList.add('active');
loadCrawlerData();
loadDeadSites();
syncReviewQueue();
loadCheckResults();
}
// 页面加载时自动检查登录状态(7天内有效)
(function checkAutoLogin() {
const loggedIn = localStorage.getItem('adminLoggedIn');
const loginTime = parseInt(localStorage.getItem('adminLoginTime') || '0');
const sevenDays = 7 * 24 * 60 * 60 * 1000;
if (loggedIn === 'true' && (Date.now() - loginTime) < sevenDays) {
showDashboard();
}
})();
function switchTab(tab) {
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
document.querySelectorAll('.tab-content').forEach(c => c.classList.remove('active'));
event.target.classList.add('active');
document.getElementById('tab-' + tab).classList.add('active');
if (tab === 'review') renderReviewLists();
}
function handleParse() {
const text = document.getElementById('customerText').value.trim();
if (!text) return;
const needs = parseNeeds(text);
const results = rankStations(needs);
lastParseResults = results;
displayResults(results);
}
function parseNeeds(text) {
const models = [];
if (/claude/i.test(text)) models.push('claude');
if (/gpt|chatgpt/i.test(text)) models.push('gpt');
if (/gemini/i.test(text)) models.push('gemini');
if (/deepseek|豆包|通义|国产|kimi/i.test(text)) models.push('domestic');
if (models.length === 0) models.push('claude', 'gpt');
let budget = 'medium';
const budgetMatch = text.match(/(\d+)\s*块|预算\s*(\d+)/);
if (budgetMatch) {
const amount = parseInt(budgetMatch[1] || budgetMatch[2]);
if (amount <= 50) budget = 'low';
else if (amount <= 200) budget = 'medium';
else budget = 'high';
}
if (/便宜|低价|性价比|低价优先/i.test(text)) budget = 'low';
const specials = [];
if (/国内|直连|翻墙/i.test(text)) specials.push('direct');
if (/稳定|可靠|不掉线|稳定优先/i.test(text)) specials.push('stable');
if (/便宜|低价|省钱|低价优先/i.test(text)) specials.push('cheap');
if (/快|速度|延迟/i.test(text)) specials.push('fast');
// 识别场景标签
const scenes = [];
if (/编程|代码|开发|写代码/i.test(text)) scenes.push('编程开发');
if (/学术|论文|写作|文章|文档/i.test(text)) scenes.push('学术写作');
if (/图像|画图|绘图|图片|dall|midjourney/i.test(text)) scenes.push('图像生成');
if (/企业|团队|商用|公司|企业级/i.test(text)) scenes.push('企业级');
if (/模型丰富|多模型|全模型/i.test(text)) scenes.push('模型丰富');
return { models, budget, specials, scenes, text };
}
function rankStations(needs) {
return stationDatabase.map(station => {
let score = station.score;
const modelMatch = needs.models.filter(m => station.models.includes(m)).length;
score += (modelMatch / needs.models.length) * 3;
const specialMatch = needs.specials.filter(s => station.special.includes(s)).length;
score += specialMatch * 1.2;
if (station.freeAmount.includes('免费')) score += 0.5;
// 生成推荐理由
const reasons = [];
if (modelMatch > 0) {
const matchedModels = needs.models.filter(m => station.models.includes(m)).map(m => modelLabels[m]);
reasons.push('支持' + matchedModels.join('、') + '模型');
}
if (station.special.includes('stable') && needs.specials.includes('stable')) {
reasons.push('稳定性高达' + station.stability + '分,满足稳定需求');
}
if (station.special.includes('cheap') && needs.specials.includes('cheap')) {
reasons.push('低价策略,性价比突出');
}
if (station.special.includes('fast') && needs.specials.includes('fast')) {
reasons.push('响应速度' + station.speed + '分,速度快');
}
if (station.freeAmount.includes('免费')) {
reasons.push('提供' + station.freeAmount);
}
if (station.features.includes('企业级') || station.features.includes('企业级SLA')) {
reasons.push('企业级服务保障');
}
if (station.features.includes('对公开票') || station.features.includes('增值税发票')) {
reasons.push('支持开票');
}
if (station.special.includes('direct')) {
reasons.push('国内直连,无需翻墙');
}
if (reasons.length === 0) {
reasons.push('综合评分' + station.score + '分,整体表现优秀');
}
// 生成适合场景
const fitScenes = [];
if (station.models.includes('claude') || station.models.includes('gpt')) {
fitScenes.push('编程开发');
}
if (station.models.includes('claude') || station.models.includes('gpt') || station.models.includes('gemini')) {
fitScenes.push('学术写作');
}
if (station.models.includes('gpt') || station.models.includes('gemini')) {
fitScenes.push('图像生成');
}
if (station.features.includes('企业级') || station.features.includes('企业级SLA') || station.price === 'high') {
fitScenes.push('企业级');
}
if (station.models.includes('domestic')) {
fitScenes.push('国产模型');
}
if (station.models.length >= 3) {
fitScenes.push('模型丰富');
}
// 去重
const uniqueScenes = [...new Set(fitScenes)];
return {
...station,
matchedScore: Math.round(score * 10) / 10,
reasons: reasons.slice(0, 3),
fitScenes: uniqueScenes.slice(0, 4)
};
}).sort((a, b) => b.matchedScore - a.matchedScore).slice(0, 5);
}
function displayResults(results) {
document.getElementById('resultsPlaceholder').style.display = 'none';
const container = document.getElementById('resultsList');
container.innerHTML = '';
results.forEach((station, idx) => {
const isSelected = selectedForCompare.some(s => s.name === station.name);
const modelTags = station.models.map(m => `<span class="meta-item">${modelLabels[m]}</span>`).join('');
const featureTags = station.features.slice(0, 3).map(f => `<span class="meta-item">${f}</span>`).join('');
const reasonHtml = station.reasons && station.reasons.length > 0
? `<div class="card-reasons">${station.reasons.map(r => '<div class="card-reason-item">' + r + '</div>').join('')}</div>`
: '';
const sceneHtml = station.fitScenes && station.fitScenes.length > 0
? `<div class="card-scenes"><span class="card-scenes-label">适合场景:</span> ${station.fitScenes.map(s => '<span class="meta-item scene-tag">' + s + '</span>').join('')}</div>`
: '';
container.innerHTML += `
<div class="station-card ${isSelected ? 'selected' : ''}" data-idx="${idx}">
<div class="card-header">
<span class="card-rank rank-${idx+1}">${idx+1}</span>
<span class="card-name">${station.name}</span>
<span class="card-score">${station.matchedScore}</span>
</div>
<div class="card-meta">${modelTags}${featureTags}</div>
${reasonHtml}
${sceneHtml}
<div class="card-actions">
<button class="btn-report" onclick="openReport(${idx})">查看分析报告</button>
<button class="btn-compare ${isSelected ? 'active' : ''}" onclick="toggleCompare(${idx})">${isSelected ? '已选择' : '加入对比'}</button>
</div>
</div>
`;
});
}
function openReport(idx) {
const station = lastParseResults[idx];
if (!station) return;
document.getElementById('reportTitle').textContent = station.name + ' - 详细分析报告';
const body = document.getElementById('reportBody');
body.innerHTML = `
<div class="report-section">
<div class="report-section-title">最佳推荐</div>
<div class="best-rec">
<div class="best-rec-icon">🏆</div>
<div class="best-rec-info">
<h4>${station.name}</h4>
<p>${station.features.join(' / ')}<br>${station.freeAmount}</p>
</div>
<div class="best-rec-score">
<div class="score-num">${station.matchedScore}</div>
<div class="score-label">综合评分</div>
</div>
</div>
</div>
<div class="report-section">
<div class="report-section-title">推荐理由</div>
<div style="padding:8px 12px;background:rgba(0,210,160,0.06);border-left:3px solid var(--green);border-radius:0 8px 8px 0;">
${(station.reasons || []).map(r => '<div style="font-size:13px;color:var(--text-secondary);line-height:2;">✓ ' + r + '</div>').join('')}
</div>
</div>
<div class="report-section">
<div class="report-section-title">适合场景</div>
<div style="display:flex;flex-wrap:wrap;gap:8px;">
${(station.fitScenes || []).map(s => '<span style="padding:6px 14px;background:rgba(108,92,231,0.15);border:1px solid rgba(108,92,231,0.3);border-radius:20px;color:var(--accent);font-size:13px;">' + s + '</span>').join('')}
</div>
</div>
<div class="report-section">
<div class="report-section-title">响应速度对比</div>
<div class="bar-chart">
${lastParseResults.map(s => `
<div class="bar-row">
<span class="bar-label">${s.name}</span>
<div class="bar-track"><div class="bar-fill speed" style="width:${s.speed*10}%">${s.speed}</div></div>
<span class="bar-value">${s.speed}</span>
</div>
`).join('')}
</div>
</div>
<div class="report-section">
<div class="report-section-title">稳定性对比</div>
<div class="bar-chart">
${lastParseResults.map(s => `
<div class="bar-row">
<span class="bar-label">${s.name}</span>
<div class="bar-track"><div class="bar-fill stability" style="width:${s.stability*10}%">${s.stability}</div></div>
<span class="bar-value">${s.stability}</span>
</div>
`).join('')}
</div>
</div>
<div class="report-section">
<div class="report-section-title">综合对比表</div>
<table class="compare-table">
<tr><th>中转站</th><th>价格</th><th>稳定性</th><th>速度</th><th>支持</th><th>评分</th></tr>
${lastParseResults.map(s => `
<tr>
<td>${s.name}</td>
<td>${priceLabels[s.price]}</td>
<td>${s.stability}</td>
<td>${s.speed}</td>
<td>${s.support}</td>
<td class="highlight">${s.matchedScore}</td>
</tr>
`).join('')}
</table>
</div>
`;
document.getElementById('reportModal').classList.add('active');
}
function closeReportModal() {
document.getElementById('reportModal').classList.remove('active');
}
function toggleCompare(idx) {
const station = lastParseResults[idx];
const existingIdx = selectedForCompare.findIndex(s => s.name === station.name);
if (existingIdx >= 0) {
selectedForCompare.splice(existingIdx, 1);
} else if (selectedForCompare.length < 3) {
selectedForCompare.push(station);
} else {
showToast('最多选择3个中转站对比');
return;
}
updateCompareBar();
displayResults(lastParseResults);
}
function updateCompareBar() {
const bar = document.getElementById('compareBar');
const count = document.getElementById('compareCount');
count.textContent = selectedForCompare.length;
if (selectedForCompare.length >= 2) {
bar.classList.add('active');
} else {
bar.classList.remove('active');
}
}
function openCompareModal() {
if (selectedForCompare.length < 2) return;
const body = document.getElementById('compareBody');
const winner = selectedForCompare.reduce((max, s) => s.matchedScore > max.matchedScore ? s : max);
body.innerHTML = `
<div class="compare-grid">
${selectedForCompare.map(s => `
<div class="compare-station ${s.name === winner.name ? 'winner' : ''}">
<div class="compare-station-header">
<h4>${s.name}</h4>
<div class="score">${s.matchedScore}</div>
<div class="score-label">综合评分</div>
${s.name === winner.name ? '<div class="winner-badge">🏆 推荐</div>' : ''}
</div>
<div class="compare-metrics">
<div class="compare-metric">
<span class="compare-metric-label">稳定性</span>
<span class="compare-metric-value ${s.stability >= 9 ? 'high' : s.stability >= 8 ? 'medium' : 'low'}">${s.stability}</span>
</div>
<div class="compare-metric">
<span class="compare-metric-label">响应速度</span>
<span class="compare-metric-value ${s.speed >= 9 ? 'high' : s.speed >= 8 ? 'medium' : 'low'}">${s.speed}</span>
</div>
<div class="compare-metric">
<span class="compare-metric-label">客服支持</span>
<span class="compare-metric-value ${s.support >= 9 ? 'high' : s.support >= 8 ? 'medium' : 'low'}">${s.support}</span>
</div>
<div class="compare-metric">
<span class="compare-metric-label">价格</span>
<span class="compare-metric-value">${priceLabels[s.price]}</span>
</div>
<div class="compare-metric">
<span class="compare-metric-label">免费额度</span>
<span class="compare-metric-value" style="font-size:12px">${s.freeAmount}</span>
</div>