1532 lines
82 KiB
HTML
1532 lines
82 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||
<title>研择 · 考研择校决策</title>
|
||
<meta name="description" content="按专业挑学校、按分数定方案。51,397 个硕士点的录取分、竞争度与择校标签,帮考研人把学校选对。">
|
||
<style>
|
||
:root{
|
||
--bg:#f5f7fb; --surface:#fff; --surface-2:#fafbfd;
|
||
--ink:#101828; --ink-2:#475467; --ink-3:#667085; --ink-4:#98a2b3;
|
||
--line:#e4e8f0; --line-2:#d3dae6;
|
||
--brand:#2b5cff; --brand-600:#1f4ae0; --brand-700:#1a3cba;
|
||
--brand-50:#eef3ff; --brand-100:#dbe6ff;
|
||
--hot:#d92d20; --warm:#dc6803; --mid:#667085; --cool:#039855;
|
||
--hot-bg:#fef3f2; --warm-bg:#fffaeb; --mid-bg:#f2f4f7; --cool-bg:#ecfdf3;
|
||
--r-sm:8px; --r:12px; --r-lg:16px; --r-xl:20px;
|
||
--sh1:0 1px 2px rgba(16,24,40,.06);
|
||
--sh2:0 4px 14px -2px rgba(16,24,40,.08),0 2px 6px -2px rgba(16,24,40,.04);
|
||
--sh3:0 16px 40px -12px rgba(16,24,40,.18);
|
||
--ease:cubic-bezier(.4,0,.2,1);
|
||
--hdr:60px;
|
||
}
|
||
*{box-sizing:border-box}
|
||
html,body{margin:0;padding:0}
|
||
body{
|
||
background:var(--bg); color:var(--ink);
|
||
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
|
||
font-size:14px; line-height:1.6; -webkit-font-smoothing:antialiased;
|
||
padding-bottom:64px;
|
||
}
|
||
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
|
||
input,select{font:inherit;color:inherit}
|
||
a{color:inherit;text-decoration:none}
|
||
h1,h2,h3,h4,p{margin:0}
|
||
ul,ol{margin:0;padding:0;list-style:none}
|
||
.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
|
||
.wrap{max-width:1180px;margin:0 auto;padding:0 20px}
|
||
|
||
/* ---------- 顶栏 ---------- */
|
||
.hdr{position:sticky;top:0;z-index:50;height:var(--hdr);
|
||
background:rgba(7,11,31,.78);backdrop-filter:saturate(180%) blur(18px);
|
||
border-bottom:1px solid rgba(255,255,255,.07);transition:background .25s var(--ease)}
|
||
.hdr.solid{background:rgba(7,11,31,.96);box-shadow:0 8px 24px -16px rgba(0,0,0,.8)}
|
||
.hdr-in{max-width:1180px;margin:0 auto;padding:0 20px;height:100%;display:flex;align-items:center;gap:16px}
|
||
.logo{display:flex;align-items:center;gap:8px;flex:0 0 auto}
|
||
.logo-m{width:26px;height:26px;border-radius:7px;background:linear-gradient(135deg,#2b5cff,#5b8cff);
|
||
display:grid;place-items:center;color:#fff;font-weight:800;font-size:13px;letter-spacing:-.5px}
|
||
.logo-t{font-size:16.5px;font-weight:900;letter-spacing:-.4px;color:#fff}
|
||
.logo-t em{font-style:normal;background:linear-gradient(100deg,#7ea6ff,#00e5b4);
|
||
-webkit-background-clip:text;background-clip:text;color:transparent}
|
||
.hsearch{flex:1;max-width:420px;position:relative}
|
||
.hsearch svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:rgba(255,255,255,.42)}
|
||
.hsearch input{width:100%;height:37px;padding:0 13px 0 35px;border:1px solid rgba(255,255,255,.13);
|
||
border-radius:999px;background:rgba(255,255,255,.07);color:#fff;font-size:13px;outline:none;
|
||
transition:.18s var(--ease)}
|
||
.hsearch input::placeholder{color:rgba(255,255,255,.4)}
|
||
.hsearch input:focus{border-color:rgba(122,166,255,.55);background:rgba(255,255,255,.13);
|
||
box-shadow:0 0 0 3px rgba(43,92,255,.22)}
|
||
.hnav{display:flex;gap:2px;margin-left:auto}
|
||
.hnav a{padding:6px 12px;border-radius:8px;font-size:13.5px;font-weight:600;
|
||
color:rgba(255,255,255,.6);transition:.14s}
|
||
.hnav a:hover{background:rgba(255,255,255,.09);color:#fff}
|
||
.hnav a.on{color:#fff;background:rgba(255,255,255,.12)}
|
||
|
||
/* ---------- 搜索下拉 ---------- */
|
||
.sdrop{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;border:1px solid var(--line);
|
||
border-radius:var(--r);box-shadow:var(--sh3);overflow:hidden;display:none;max-height:420px;overflow-y:auto;z-index:60}
|
||
.sdrop.on{display:block}
|
||
.sdrop-h{padding:7px 12px;font-size:11.5px;color:var(--ink-4);font-weight:700;letter-spacing:.4px;background:var(--surface-2)}
|
||
.sitem{display:flex;align-items:center;gap:9px;padding:9px 12px;cursor:pointer;border-bottom:1px solid #f4f6fa}
|
||
.sitem:last-child{border-bottom:0}
|
||
.sitem:hover,.sitem.act{background:var(--brand-50)}
|
||
.sitem b{font-weight:700;font-size:13.5px}
|
||
.sitem .sc{font-size:11.5px;color:var(--ink-4);margin-left:auto;font-variant-numeric:tabular-nums}
|
||
.sitem .ct{font-size:11px;padding:1px 6px;border-radius:4px;background:var(--mid-bg);color:var(--ink-3);font-weight:600}
|
||
|
||
/* ---------- 视图 ---------- */
|
||
.view{display:none;animation:fadeUp .28s var(--ease)}
|
||
.view.on{display:block}
|
||
@keyframes fadeUp{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
|
||
|
||
/* ---------- 首页 Hero ---------- */
|
||
.hero{position:relative;padding:72px 0 96px;overflow:hidden;color:#fff;
|
||
background:
|
||
radial-gradient(920px 460px at 10% -14%,rgba(43,92,255,.42),transparent 62%),
|
||
radial-gradient(820px 420px at 90% 4%,rgba(109,74,255,.32),transparent 60%),
|
||
radial-gradient(700px 360px at 52% 128%,rgba(0,212,160,.16),transparent 64%),
|
||
linear-gradient(168deg,#070b1f 0%,#0a1130 48%,#080d24 100%)}
|
||
.hero::before{content:"";position:absolute;inset:0;pointer-events:none;
|
||
background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),
|
||
linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);
|
||
background-size:54px 54px;
|
||
-webkit-mask-image:radial-gradient(ellipse 80% 70% at 50% 20%,#000 20%,transparent 78%);
|
||
mask-image:radial-gradient(ellipse 80% 70% at 50% 20%,#000 20%,transparent 78%)}
|
||
.hero::after{content:"";position:absolute;left:50%;top:-120px;width:760px;height:420px;
|
||
transform:translateX(-50%);border-radius:50%;pointer-events:none;
|
||
background:radial-gradient(closest-side,rgba(122,166,255,.2),transparent 70%);
|
||
filter:blur(28px);animation:glow 9s ease-in-out infinite alternate}
|
||
@keyframes glow{from{opacity:.55;transform:translateX(-50%) scale(1)}to{opacity:1;transform:translateX(-50%) scale(1.12)}}
|
||
.hero-in{position:relative;z-index:2}
|
||
.hero-tag{display:inline-flex;align-items:center;gap:7px;padding:5px 13px;border-radius:999px;
|
||
background:rgba(0,229,180,.1);border:1px solid rgba(0,229,180,.26);
|
||
color:#5cf0cd;font-size:12.5px;font-weight:700;margin-bottom:20px;letter-spacing:.2px}
|
||
.hero-tag i{width:6px;height:6px;border-radius:50%;background:#00e5b4;display:block;
|
||
box-shadow:0 0 0 0 rgba(0,229,180,.7);animation:pulse 2.2s infinite}
|
||
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(0,229,180,.6)}70%{box-shadow:0 0 0 8px rgba(0,229,180,0)}100%{box-shadow:0 0 0 0 rgba(0,229,180,0)}}
|
||
.hero h1{font-size:clamp(31px,5vw,56px);line-height:1.08;letter-spacing:-2.4px;font-weight:900;
|
||
max-width:820px;color:#fff;text-wrap:balance}
|
||
.hero h1 em{font-style:normal;white-space:nowrap;
|
||
background:linear-gradient(100deg,#8fb4ff 0%,#00e5b4 52%,#b9a6ff 100%);
|
||
-webkit-background-clip:text;background-clip:text;color:transparent}
|
||
.hero p{margin-top:16px;font-size:15.5px;color:rgba(255,255,255,.6);max-width:620px;line-height:1.75}
|
||
.hero p b{color:#fff;font-variant-numeric:tabular-nums;font-weight:700}
|
||
.hero p .st b{color:#5cf0cd}
|
||
.hero-act{margin-top:26px;display:flex;gap:11px;flex-wrap:wrap;align-items:center}
|
||
.btn-primary{display:inline-flex;align-items:center;gap:7px;height:46px;padding:0 24px;border-radius:12px;
|
||
background:linear-gradient(120deg,#2b5cff,#6d4aff);color:#fff;font-size:15px;font-weight:700;
|
||
box-shadow:0 10px 30px -10px rgba(74,92,255,.85),inset 0 1px 0 rgba(255,255,255,.18);
|
||
transition:.18s var(--ease)}
|
||
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 16px 38px -12px rgba(74,92,255,.95),inset 0 1px 0 rgba(255,255,255,.22)}
|
||
.btn-ghost{display:inline-flex;align-items:center;gap:6px;height:46px;padding:0 20px;border-radius:12px;
|
||
border:1px solid var(--line-2);background:#fff;font-size:14.5px;font-weight:600;color:var(--ink-2);transition:.16s}
|
||
.btn-ghost:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-50)}
|
||
.hero .btn-ghost{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.18);color:#fff;backdrop-filter:blur(6px)}
|
||
.hero .btn-ghost:hover{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.4);color:#fff}
|
||
|
||
/* hero 数据条 */
|
||
.hstats{display:flex;gap:0;margin-top:38px;flex-wrap:wrap;
|
||
border-top:1px solid rgba(255,255,255,.09);padding-top:22px;max-width:760px}
|
||
.hstat{padding-right:34px;margin-right:34px;border-right:1px solid rgba(255,255,255,.09)}
|
||
.hstat:last-child{border-right:0;margin-right:0;padding-right:0}
|
||
.hstat b{display:block;font-size:26px;font-weight:900;letter-spacing:-1px;line-height:1.1;
|
||
font-variant-numeric:tabular-nums;color:#fff}
|
||
.hstat b i{font-style:normal;font-size:13px;font-weight:700;color:rgba(255,255,255,.5);margin-left:3px;letter-spacing:0}
|
||
.hstat span{display:block;font-size:12px;color:rgba(255,255,255,.42);margin-top:5px;letter-spacing:.3px}
|
||
|
||
/* ---------- 入口矩阵 ---------- */
|
||
.entries{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;
|
||
margin-top:-64px;position:relative;z-index:5}
|
||
.entry{position:relative;background:#fff;border:1px solid rgba(16,24,40,.07);border-radius:18px;
|
||
padding:20px 20px 17px;text-align:left;transition:.22s var(--ease);overflow:hidden;display:block;
|
||
box-shadow:0 4px 20px -8px rgba(16,24,40,.12),0 1px 2px rgba(16,24,40,.04)}
|
||
.entry::before{content:"";position:absolute;left:0;right:0;top:0;height:2px;
|
||
background:linear-gradient(90deg,#2b5cff,#00d4a0);opacity:0;transition:.22s}
|
||
.entry:hover{transform:translateY(-5px);box-shadow:0 22px 44px -18px rgba(16,24,40,.28),0 2px 6px rgba(16,24,40,.05);
|
||
border-color:rgba(43,92,255,.28)}
|
||
.entry:hover::before{opacity:1}
|
||
.entry.main{grid-column:span 2;color:#fff;border:0;
|
||
background:linear-gradient(118deg,#2246d8 0%,#3d63ff 46%,#7b4dff 100%);
|
||
box-shadow:0 24px 56px -22px rgba(52,84,255,.85),inset 0 1px 0 rgba(255,255,255,.2)}
|
||
.entry.main:hover{transform:translateY(-5px);
|
||
box-shadow:0 32px 66px -24px rgba(52,84,255,.95),inset 0 1px 0 rgba(255,255,255,.24)}
|
||
.entry.main::before{display:none}
|
||
.entry.main::after{content:"";position:absolute;inset:0;pointer-events:none;
|
||
background:linear-gradient(112deg,transparent 32%,rgba(255,255,255,.18) 46%,transparent 58%);
|
||
transform:translateX(-130%);transition:transform .85s var(--ease)}
|
||
.entry.main:hover::after{transform:translateX(130%)}
|
||
.e-ico{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;margin-bottom:14px;
|
||
background:linear-gradient(135deg,#eef3ff,#e3ecff);color:var(--brand);
|
||
box-shadow:inset 0 0 0 1px rgba(43,92,255,.09);transition:.22s var(--ease)}
|
||
.entry.main .e-ico{background:rgba(255,255,255,.17);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)}
|
||
.entry:not(.main):hover .e-ico{background:linear-gradient(135deg,#2b5cff,#6d4aff);color:#fff;
|
||
box-shadow:0 8px 18px -8px rgba(43,92,255,.8)}
|
||
.entry h3{font-size:16.5px;font-weight:800;letter-spacing:-.35px;display:flex;align-items:center;gap:6px}
|
||
.entry.main h3{font-size:20px;letter-spacing:-.5px}
|
||
.entry p{margin-top:7px;font-size:12.5px;color:var(--ink-3);line-height:1.62}
|
||
.entry.main p{color:rgba(255,255,255,.84);font-size:13px;max-width:92%}
|
||
.e-meta{margin-top:15px;display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--ink-4);
|
||
font-variant-numeric:tabular-nums;border-top:1px solid var(--line);padding-top:12px}
|
||
.entry.main .e-meta{border-top-color:rgba(255,255,255,.2);color:rgba(255,255,255,.74)}
|
||
.e-go{margin-left:auto;display:inline-flex;align-items:center;gap:3px;font-weight:700;
|
||
color:var(--brand);font-size:12px}
|
||
.entry.main .e-go{color:#fff}
|
||
.entry:hover .e-go svg{transform:translateX(3px)}
|
||
.e-go svg{transition:.18s var(--ease)}
|
||
|
||
/* 入场动效 */
|
||
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
|
||
.entry,.mcard,.cat{animation:rise .5s var(--ease) backwards}
|
||
.entry:nth-child(1){animation-delay:.04s}.entry:nth-child(2){animation-delay:.09s}
|
||
.entry:nth-child(3){animation-delay:.14s}.entry:nth-child(4){animation-delay:.19s}
|
||
.entry:nth-child(5){animation-delay:.24s}
|
||
.reveal{opacity:0;transform:translateY(16px);transition:opacity .6s var(--ease),transform .6s var(--ease)}
|
||
.reveal.in{opacity:1;transform:none}
|
||
|
||
/* ---------- 章节 ---------- */
|
||
.sec{margin-top:40px}
|
||
.sec-hd{display:flex;align-items:baseline;gap:10px;margin-bottom:14px}
|
||
.sec-hd h2{font-size:19px;font-weight:800;letter-spacing:-.4px}
|
||
.sec-hd span{font-size:12.5px;color:var(--ink-4)}
|
||
.sec-hd .more{margin-left:auto;font-size:12.5px;font-weight:600;color:var(--brand);display:inline-flex;align-items:center;gap:3px}
|
||
.sec-hd .more:hover{text-decoration:underline}
|
||
|
||
/* ---------- 专业卡 ---------- */
|
||
.mgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:11px}
|
||
.mcard{background:#fff;border:1px solid rgba(16,24,40,.07);border-radius:14px;padding:14px 15px;min-width:0;
|
||
transition:.2s var(--ease);display:block;position:relative;
|
||
box-shadow:0 2px 10px -4px rgba(16,24,40,.08)}
|
||
.mcard:hover{border-color:rgba(43,92,255,.3);transform:translateY(-4px);
|
||
box-shadow:0 18px 34px -16px rgba(16,24,40,.24)}
|
||
.mc-top{display:flex;align-items:center;gap:7px;min-width:0}
|
||
.mc-top b{font-size:14.5px;font-weight:700;letter-spacing:-.2px;overflow:hidden;
|
||
text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1 1 auto}
|
||
.mc-code{font-size:10.5px;color:var(--ink-4);font-variant-numeric:tabular-nums;flex:0 0 auto}
|
||
.mc-ml{font-size:11px;padding:1px 6px;border-radius:4px;background:var(--mid-bg);color:var(--ink-3);flex:0 0 auto}
|
||
.mc-bar{margin-top:10px;height:4px;border-radius:3px;background:var(--mid-bg);overflow:hidden;display:flex}
|
||
.mc-bar i{display:block;height:100%}
|
||
.mc-bar i.c{background:var(--cool)}
|
||
.mc-bar i.m{background:#cbd5e1}
|
||
.mc-bar i.h{background:var(--warm)}
|
||
.mc-bar i.na{background:#e9edf4}
|
||
.mc-bar i.x{background:var(--hot)}
|
||
.mc-bot{margin-top:8px;display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--ink-4);
|
||
font-variant-numeric:tabular-nums;flex-wrap:wrap;min-width:0}
|
||
.mc-bot b{color:var(--ink-2);font-weight:700}
|
||
.mc-pick{color:var(--cool);font-weight:700}
|
||
|
||
/* ---------- 门类 ---------- */
|
||
.cats{display:grid;grid-template-columns:repeat(7,1fr);gap:9px}
|
||
.cat{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:11px 12px;text-align:left;
|
||
transition:.16s var(--ease);display:flex;align-items:center;gap:8px}
|
||
.cat:hover{border-color:var(--brand);background:var(--brand-50)}
|
||
.cat b{font-size:13.5px;font-weight:700}
|
||
.cat span{margin-left:auto;font-size:11px;color:var(--ink-4);font-variant-numeric:tabular-nums}
|
||
|
||
/* ---------- 快捷通道 ---------- */
|
||
.quick{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
|
||
.qchip{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 13px;border-radius:999px;
|
||
border:1px solid var(--line-2);background:#fff;font-size:13px;font-weight:600;color:var(--ink-2);transition:.16s}
|
||
.qchip:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-50)}
|
||
.qchip i{width:6px;height:6px;border-radius:50%;display:block}
|
||
|
||
/* ---------- 口径说明 ---------- */
|
||
.note{margin-top:44px;padding:16px 18px;background:#fff;border:1px solid var(--line);border-radius:var(--r);
|
||
font-size:12px;line-height:1.75;color:var(--ink-3)}
|
||
.note b{color:var(--ink-2)}
|
||
.note-h{display:flex;align-items:center;gap:6px;font-weight:700;color:var(--ink-2);margin-bottom:6px;font-size:12.5px}
|
||
|
||
/* ---------- 页头 ---------- */
|
||
.ph{padding:22px 0 0}
|
||
.crumb{font-size:12.5px;color:var(--ink-4);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
|
||
.crumb a:hover{color:var(--brand)}
|
||
.ph h1{margin-top:10px;font-size:28px;font-weight:800;letter-spacing:-.8px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
|
||
.ph h1 .code{font-size:13px;font-weight:600;color:var(--ink-4);background:var(--mid-bg);
|
||
padding:3px 8px;border-radius:6px;letter-spacing:0;font-variant-numeric:tabular-nums}
|
||
.ph .sub{margin-top:7px;font-size:13.5px;color:var(--ink-3)}
|
||
.ph .sub b{color:var(--ink-2)}
|
||
.kpis{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}
|
||
.kpi{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:11px 16px;min-width:112px}
|
||
.kpi b{display:block;font-size:21px;font-weight:800;letter-spacing:-.6px;font-variant-numeric:tabular-nums;line-height:1.2}
|
||
.kpi i{display:block;font-size:11.5px;color:var(--ink-4);font-style:normal;margin-top:2px}
|
||
.kpi.b b{color:var(--brand)}
|
||
.switch-major{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 12px;border-radius:9px;
|
||
border:1px solid var(--line-2);background:#fff;font-size:12.5px;font-weight:700;color:var(--ink-2);
|
||
transition:.15s;letter-spacing:0;vertical-align:middle}
|
||
.switch-major:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-50)}
|
||
.insight{margin-top:14px;display:flex;align-items:flex-start;gap:10px;padding:13px 16px;
|
||
border-radius:13px;background:linear-gradient(100deg,#eef3ff,#f4f0ff 70%,#eefaf6);
|
||
border:1px solid rgba(43,92,255,.14);font-size:13.5px;line-height:1.7;color:var(--ink-2)}
|
||
.insight svg{flex:0 0 auto;margin-top:2px;color:var(--brand)}
|
||
.insight b{color:var(--ink);font-weight:800}
|
||
.insight .hl{color:var(--brand-600);font-weight:800}
|
||
.insight .g{color:#027a48;font-weight:800}
|
||
|
||
/* ---------- 工具栏 ---------- */
|
||
.tbar{position:sticky;top:var(--hdr);z-index:30;background:var(--bg);padding:14px 0 10px;margin-top:14px;
|
||
border-bottom:1px solid var(--line)}
|
||
.tbar-in{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
|
||
.seg{display:inline-flex;background:#eef1f6;border-radius:10px;padding:3px;gap:2px}
|
||
.seg button{padding:6px 13px;border-radius:8px;font-size:13px;font-weight:600;color:var(--ink-2);transition:.14s;white-space:nowrap}
|
||
.seg button.on{background:#fff;color:var(--brand);box-shadow:var(--sh1)}
|
||
.sel{height:34px;padding:0 30px 0 11px;border:1px solid var(--line-2);border-radius:9px;background:#fff;
|
||
font-size:13px;font-weight:600;color:var(--ink-2);appearance:none;cursor:pointer;
|
||
background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
|
||
background-repeat:no-repeat;background-position:right 10px center}
|
||
.sel:focus{outline:none;border-color:var(--brand)}
|
||
.tbar .cnt{margin-left:auto;font-size:12.5px;color:var(--ink-4);font-variant-numeric:tabular-nums}
|
||
.chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
|
||
.chip{height:28px;padding:0 11px;border-radius:999px;border:1px solid var(--line-2);background:#fff;
|
||
font-size:12.5px;font-weight:600;color:var(--ink-2);transition:.14s;display:inline-flex;align-items:center;gap:5px}
|
||
.chip:hover{border-color:var(--brand);color:var(--brand)}
|
||
.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
|
||
.chip .dot{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.7}
|
||
|
||
/* ---------- 榜单行 ---------- */
|
||
.rank{margin-top:10px;display:flex;flex-direction:column;gap:7px}
|
||
.rrow{display:grid;grid-template-columns:38px minmax(0,1fr) 210px 74px 62px;gap:12px;align-items:center;
|
||
background:#fff;border:1px solid rgba(16,24,40,.07);border-radius:13px;padding:13px 15px 13px 17px;
|
||
transition:.16s var(--ease);cursor:pointer;position:relative;overflow:hidden;
|
||
box-shadow:0 1px 3px rgba(16,24,40,.04)}
|
||
.rrow::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
|
||
background:var(--gs,#e4e8f0);transition:.16s}
|
||
.rrow:hover{border-color:rgba(43,92,255,.3);box-shadow:0 12px 28px -14px rgba(16,24,40,.24);transform:translateY(-1px)}
|
||
.rrow:hover::before{width:4px}
|
||
.rk{font-size:13.5px;font-weight:800;color:var(--ink-4);text-align:center;
|
||
font-variant-numeric:tabular-nums;width:26px;height:26px;line-height:26px;border-radius:8px}
|
||
.rk.t1{background:linear-gradient(135deg,#ffc84a,#f08200);color:#fff;box-shadow:0 5px 12px -4px rgba(240,130,0,.75)}
|
||
.rk.t2{background:linear-gradient(135deg,#b9c2d0,#8b97a8);color:#fff;box-shadow:0 4px 10px -5px rgba(139,151,168,.8)}
|
||
.rk.t3{background:linear-gradient(135deg,#e0a878,#c07a45);color:#fff;box-shadow:0 4px 10px -5px rgba(192,122,69,.75)}
|
||
.rt{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
|
||
.rt b{font-size:15px;font-weight:700;letter-spacing:-.2px}
|
||
.rs{font-size:12px;color:var(--ink-4);margin-top:2px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
|
||
.rs .sep{color:#dfe4ec}
|
||
.rtags{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap}
|
||
.tag{font-size:10.5px;font-weight:700;padding:1.5px 6px;border-radius:4px;letter-spacing:.2px;white-space:nowrap}
|
||
.t-ln{background:#ecfdf3;color:#027a48}
|
||
.t-ok{background:#f0f9ff;color:#026aa2}
|
||
.t-yk{background:#fef3f2;color:#b42318}
|
||
.t-np{background:#fef3f2;color:#b42318}
|
||
.t-tj{background:#f2f4f7;color:#475467}
|
||
.t-ht{background:#fff4ed;color:#c4320a}
|
||
.t-sm{background:#f2f4f7;color:#475467}
|
||
.t-fb{background:#fffaeb;color:#b54708}
|
||
.t-sb{background:#f2f4f7;color:#475467}
|
||
.t-bk{background:#f2f4f7;color:#475467}
|
||
.t-zk{background:#fffaeb;color:#b54708}
|
||
.t-sw{background:#fef3f2;color:#b42318}
|
||
.t-gf{background:#ecfdf3;color:#027a48}
|
||
.lv{font-size:10.5px;font-weight:700;padding:1.5px 6px;border-radius:4px;letter-spacing:.2px;white-space:nowrap}
|
||
.lv-985{background:#f4f0ff;color:#5925dc}
|
||
.lv-211{background:#eef3ff;color:#1f4ae0}
|
||
.lv-双一流{background:#f0f9ff;color:#026aa2}
|
||
.lv-双非{background:#f2f4f7;color:#475467}
|
||
.rmets{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;text-align:right}
|
||
.rmets b{display:block;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.3px;line-height:1.25}
|
||
.rmets i{display:block;font-size:10.5px;color:var(--ink-4);font-style:normal;margin-top:1px}
|
||
.rmets .hi b{color:var(--brand)}
|
||
.grade{font-size:11.5px;font-weight:800;padding:4px 0;border-radius:7px;text-align:center;letter-spacing:.2px}
|
||
.g-极热{background:var(--hot-bg);color:var(--hot)}
|
||
.g-偏热{background:var(--warm-bg);color:var(--warm)}
|
||
.g-中性{background:var(--mid-bg);color:var(--mid)}
|
||
.g-偏冷{background:var(--cool-bg);color:var(--cool)}
|
||
.g-na{background:var(--mid-bg);color:var(--ink-4);font-weight:600}
|
||
.spark{width:62px;height:26px;display:block}
|
||
|
||
/* ---------- 空态 / 骨架 ---------- */
|
||
.empty{padding:48px 20px;text-align:center;background:#fff;border:1px dashed var(--line-2);border-radius:var(--r);margin-top:12px}
|
||
.empty b{display:block;font-size:15px;font-weight:700;margin-bottom:6px}
|
||
.empty p{font-size:13px;color:var(--ink-3)}
|
||
.skel{background:linear-gradient(90deg,#eef1f6 25%,#f7f9fc 37%,#eef1f6 63%);background-size:400% 100%;
|
||
animation:sk 1.2s ease infinite;border-radius:8px}
|
||
@keyframes sk{0%{background-position:100% 50%}100%{background-position:0 50%}}
|
||
|
||
/* ---------- 冲稳保 ---------- */
|
||
.form{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);padding:22px;margin-top:16px}
|
||
.form-row{display:grid;grid-template-columns:minmax(0,1fr) 210px auto;gap:14px;align-items:end}
|
||
.field label{display:block;font-size:12.5px;font-weight:700;color:var(--ink-2);margin-bottom:6px}
|
||
.field input{width:100%;height:44px;padding:0 13px;border:1px solid var(--line-2);border-radius:10px;
|
||
background:#fff;font-size:15px;outline:none;transition:.16s;font-variant-numeric:tabular-nums}
|
||
.field input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-50)}
|
||
.field .hh{font-size:11.5px;color:var(--ink-4);margin-top:5px;line-height:1.5}
|
||
.picked{display:flex;align-items:center;gap:8px;height:44px;padding:0 13px;border:1px solid var(--line-2);
|
||
border-radius:10px;background:var(--surface-2);font-size:14px;font-weight:600;cursor:pointer}
|
||
.picked:hover{border-color:var(--brand)}
|
||
.picked em{font-style:normal;color:var(--ink-4);font-weight:400}
|
||
.tiers{margin-top:22px;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
|
||
.tier{border-radius:var(--r-lg);border:1px solid var(--line);background:#fff;overflow:hidden}
|
||
.tier-hd{padding:13px 15px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px}
|
||
.tier-hd b{font-size:15px;font-weight:800}
|
||
.tier-hd span{margin-left:auto;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
|
||
.tier-hd i{width:7px;height:7px;border-radius:50%;display:block}
|
||
.tier.tc .tier-hd{background:#fef3f2}.tier.tc .tier-hd b,.tier.tc .tier-hd span{color:#b42318}.tier.tc .tier-hd i{background:#d92d20}
|
||
.tier.tw .tier-hd{background:#fffaeb}.tier.tw .tier-hd b,.tier.tw .tier-hd span{color:#b54708}.tier.tw .tier-hd i{background:#dc6803}
|
||
.tier.tb .tier-hd{background:#ecfdf3}.tier.tb .tier-hd b,.tier.tb .tier-hd span{color:#027a48}.tier.tb .tier-hd i{background:#039855}
|
||
.tier-bd{padding:6px}
|
||
.titem{padding:9px 10px;border-radius:8px;cursor:pointer;transition:.13s}
|
||
.titem:hover{background:var(--brand-50)}
|
||
.titem+.titem{border-top:1px solid #f2f5fa}
|
||
.titem .n{font-size:13.5px;font-weight:700;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
|
||
.titem .m{font-size:11.5px;color:var(--ink-4);margin-top:2px;font-variant-numeric:tabular-nums;display:flex;gap:8px;flex-wrap:wrap}
|
||
.titem .m b{color:var(--ink-2);font-weight:700}
|
||
.tier-more{padding:9px;text-align:center;font-size:12.5px;color:var(--brand);font-weight:600}
|
||
|
||
/* ---------- 抽屉 ---------- */
|
||
.mask{position:fixed;inset:0;background:rgba(16,24,40,.42);opacity:0;pointer-events:none;transition:.22s;z-index:80}
|
||
.mask.on{opacity:1;pointer-events:auto}
|
||
.sheet{position:fixed;top:0;right:0;bottom:0;width:min(560px,100%);background:#fff;z-index:90;
|
||
transform:translateX(100%);transition:transform .28s var(--ease);display:flex;flex-direction:column;box-shadow:var(--sh3)}
|
||
.sheet.on{transform:none}
|
||
.sheet-hd{display:flex;align-items:flex-start;gap:10px;padding:16px 18px;border-bottom:1px solid var(--line)}
|
||
.sheet-hd h3{font-size:17px;font-weight:800;letter-spacing:-.3px;line-height:1.35}
|
||
.sheet-hd .sub{font-size:12.5px;color:var(--ink-3);margin-top:3px}
|
||
.sheet-x{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;color:var(--ink-3);flex:0 0 auto}
|
||
.sheet-x:hover{background:var(--mid-bg)}
|
||
.sheet-bd{flex:1;overflow-y:auto;padding:16px 18px 28px}
|
||
.sgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
|
||
.sbox{border:1px solid var(--line);border-radius:10px;padding:10px 12px}
|
||
.sbox i{display:block;font-size:11.5px;color:var(--ink-4);font-style:normal}
|
||
.sbox b{display:block;font-size:19px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.5px;margin-top:1px}
|
||
.s-t{font-size:13px;font-weight:800;margin:18px 0 8px;display:flex;align-items:center;gap:7px}
|
||
.s-t::before{content:"";width:3px;height:13px;border-radius:2px;background:var(--brand)}
|
||
.yr{width:100%;border-collapse:collapse;font-size:12.5px;font-variant-numeric:tabular-nums}
|
||
.yr th{text-align:left;font-weight:600;color:var(--ink-4);padding:6px 4px;font-size:11.5px;border-bottom:1px solid var(--line)}
|
||
.yr td{padding:6px 4px;border-bottom:1px solid #f4f6fa}
|
||
.yr td:not(:first-child){text-align:right}
|
||
.tagline{display:flex;flex-wrap:wrap;gap:5px}
|
||
.tagx{font-size:11.5px;padding:3px 8px;border-radius:6px;background:var(--mid-bg);color:var(--ink-2);font-weight:600}
|
||
.tagx.ln{background:#ecfdf3;color:#027a48}.tagx.ok{background:#f0f9ff;color:#026aa2}
|
||
.tagx.yk,.tagx.np,.tagx.sw{background:#fef3f2;color:#b42318}
|
||
.tagx.ht{background:#fff4ed;color:#c4320a}.tagx.fb,.tagx.zk{background:#fffaeb;color:#b54708}
|
||
.sheet-ft{padding:12px 18px;border-top:1px solid var(--line);display:flex;gap:9px}
|
||
.sheet-ft .btn-primary,.sheet-ft .btn-ghost{height:42px;flex:1;justify-content:center;font-size:14px}
|
||
|
||
/* ---------- 对比浮条 ---------- */
|
||
.cmpbar{position:fixed;left:50%;bottom:18px;transform:translate(-50%,140%);z-index:70;opacity:0;
|
||
visibility:hidden;pointer-events:none;
|
||
background:#101828;color:#fff;border-radius:14px;padding:9px 10px 9px 16px;display:flex;align-items:center;gap:12px;
|
||
box-shadow:var(--sh3);transition:transform .26s var(--ease);max-width:calc(100% - 32px)}
|
||
.cmpbar.on{transform:translate(-50%,0);opacity:1;visibility:visible;pointer-events:auto}
|
||
.cmpbar .cn{font-size:13px;font-weight:600;white-space:nowrap}
|
||
.cmpbar .cn b{color:#7ea6ff}
|
||
.cmpbar .cgo{height:34px;padding:0 15px;border-radius:9px;background:var(--brand);color:#fff;
|
||
font-size:13px;font-weight:700;white-space:nowrap}
|
||
.cmpbar .cclr{color:#98a2b3;font-size:12.5px;padding:0 6px}
|
||
.cmpbar .cclr:hover{color:#fff}
|
||
|
||
/* ---------- 对比表 ---------- */
|
||
.cmpwrap{margin-top:16px;overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:var(--r-lg)}
|
||
.cmpt{width:100%;border-collapse:collapse;font-size:13px;min-width:620px}
|
||
.cmpt th,.cmpt td{padding:11px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
|
||
.cmpt thead th{background:var(--surface-2);font-size:12px;color:var(--ink-3);font-weight:700}
|
||
.cmpt tbody th{font-weight:600;color:var(--ink-3);font-size:12.5px;width:120px;background:var(--surface-2)}
|
||
.cmpt td b{font-size:15px;font-weight:800;font-variant-numeric:tabular-nums}
|
||
.cmpt .best{color:var(--cool)}
|
||
.cmpt-x{color:var(--ink-4);font-size:12px}
|
||
.cmpt-x:hover{color:var(--hot)}
|
||
|
||
.still *, .still *::before, .still *::after{animation:none!important;transition:none!important}
|
||
|
||
/* ---------- 底部 tabbar ---------- */
|
||
.tabbar{display:none;position:fixed;left:0;right:0;bottom:0;z-index:60;background:rgba(255,255,255,.94);
|
||
backdrop-filter:blur(12px);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
|
||
.tabbar-in{display:grid;grid-template-columns:repeat(4,1fr);height:56px}
|
||
.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
|
||
font-size:10.5px;font-weight:600;color:var(--ink-4);transition:.14s}
|
||
.tab.on{color:var(--brand)}
|
||
.tab svg{width:21px;height:21px}
|
||
|
||
/* ---------- 响应式 ---------- */
|
||
@media (max-width:1024px){
|
||
.entries{grid-template-columns:repeat(2,1fr);margin-top:-56px}
|
||
.entry.main{grid-column:span 2}
|
||
.mgrid{grid-template-columns:repeat(3,1fr)}
|
||
.cats{grid-template-columns:repeat(4,1fr)}
|
||
.rrow{grid-template-columns:32px minmax(0,1fr) 180px 68px;gap:10px}
|
||
.spark{display:none}
|
||
}
|
||
@media (max-width:720px){
|
||
body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
|
||
.wrap{padding:0 14px}
|
||
.hdr-in{padding:0 14px;gap:10px}
|
||
.hnav{display:none}
|
||
.hsearch{max-width:none}
|
||
.tabbar{display:block}
|
||
.hero{padding:32px 0 92px}
|
||
.hero h1{font-size:27px;letter-spacing:-.9px;line-height:1.14}
|
||
.hero p{font-size:13.5px;line-height:1.7}
|
||
.btn-primary,.btn-ghost{height:42px;font-size:14px}
|
||
.hstats{display:grid;grid-template-columns:repeat(2,1fr);gap:15px 10px;
|
||
margin-top:26px;padding-top:18px;max-width:none}
|
||
.hstat{padding-right:0;margin-right:0;border-right:0}
|
||
.hstat b{font-size:22px}
|
||
.hstat span{font-size:11.5px;margin-top:3px}
|
||
.entries{grid-template-columns:1fr;gap:10px;margin-top:-46px}
|
||
.entry.main{grid-column:span 1}
|
||
.entry{padding:15px}
|
||
.mgrid{grid-template-columns:repeat(2,1fr);gap:9px}
|
||
.cats{grid-template-columns:repeat(2,1fr)}
|
||
.ph h1{font-size:22px}
|
||
.kpis{gap:7px}
|
||
.kpi{flex:1;min-width:0;padding:9px 12px}
|
||
.kpi b{font-size:18px}
|
||
.tbar{padding:10px 0 8px}
|
||
.seg button{padding:5px 10px;font-size:12.5px}
|
||
.cnt{display:none}
|
||
.rrow{grid-template-columns:28px minmax(0,1fr);gap:8px;padding:11px 12px}
|
||
.rrow .rmets{grid-column:2;grid-row:2;margin-top:8px;text-align:left;
|
||
grid-template-columns:repeat(3,auto);justify-content:start;gap:18px;padding-top:8px;border-top:1px solid #f2f5fa}
|
||
.rmets i{font-size:10px}
|
||
.rrow .grade{position:absolute;right:12px;top:11px;font-size:10.5px;padding:2px 8px}
|
||
.rk{font-size:12.5px;align-self:start;padding-top:2px}
|
||
.rt b{font-size:14px}
|
||
.form{padding:16px}
|
||
.form-row{grid-template-columns:1fr;gap:12px}
|
||
.tiers{grid-template-columns:1fr}
|
||
.sheet{width:100%}
|
||
.cmpbar{bottom:calc(70px + env(safe-area-inset-bottom));left:14px;right:14px;transform:translateY(160%);max-width:none}
|
||
.cmpbar.on{transform:none}
|
||
.note{margin-top:28px}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<header class="hdr">
|
||
<div class="hdr-in">
|
||
<a class="logo" href="#/home">
|
||
<span class="logo-m">研</span>
|
||
<span class="logo-t">研<em>择</em></span>
|
||
</a>
|
||
<div class="hsearch">
|
||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><circle cx="11" cy="11" r="7"/><path d="M20 20l-3.5-3.5"/></svg>
|
||
<input id="q" type="search" placeholder="搜院校 / 专业 / 专业代码" autocomplete="off" aria-label="搜索院校或专业">
|
||
<div class="sdrop" id="sdrop"></div>
|
||
</div>
|
||
<nav class="hnav">
|
||
<a href="#/home" data-nav="home">首页</a>
|
||
<a href="#/rank" data-nav="rank">专业难度榜</a>
|
||
<a href="#/score" data-nav="score">估分择校</a>
|
||
<a href="#/schools" data-nav="schools">院校库</a>
|
||
<a href="#/compare" data-nav="compare">对比</a>
|
||
</nav>
|
||
</div>
|
||
</header>
|
||
|
||
<main>
|
||
<!-- ============ 首页 ============ -->
|
||
<section class="view" id="v-home">
|
||
<div class="hero">
|
||
<div class="wrap hero-in">
|
||
<div class="hero-tag"><i></i>2026 届录取数据已更新</div>
|
||
<h1>选错学校,<br>一年白费。<em>先选对赛道</em></h1>
|
||
<p>这里不是数据库查询台。你要回答的只有一个问题:
|
||
<b>以我的分数和专业,该报哪一所</b>。</p>
|
||
<div class="hero-act">
|
||
<a class="btn-primary" href="#/rank">
|
||
按专业挑学校
|
||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M5 12h13M13 6l6 6-6 6"/></svg>
|
||
</a>
|
||
<a class="btn-ghost" href="#/score">我有个大概分数 →</a>
|
||
</div>
|
||
<div class="hstats" id="hstats">
|
||
<div class="hstat"><b>—</b><span>个硕士点</span></div>
|
||
<div class="hstat"><b>—</b><span>所院校</span></div>
|
||
<div class="hstat"><b>—</b><span>个专业</span></div>
|
||
<div class="hstat"><b>—</b><span>条择校标签</span></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="wrap">
|
||
<div class="entries" id="entries"></div>
|
||
|
||
<div class="sec">
|
||
<div class="sec-hd">
|
||
<h2>大家最近在看</h2>
|
||
<span>按硕士点数量排序</span>
|
||
<a class="more" href="#/rank">全部 1,393 个专业 →</a>
|
||
</div>
|
||
<div class="mgrid" id="hot-majors"></div>
|
||
</div>
|
||
|
||
<div class="sec">
|
||
<div class="sec-hd">
|
||
<h2>按你的情况走</h2>
|
||
<span>选一条最接近的,直接到对应榜单</span>
|
||
</div>
|
||
<div class="quick" id="quick"></div>
|
||
</div>
|
||
|
||
<div class="sec">
|
||
<div class="sec-hd"><h2>按学科门类</h2><span>14 个门类,1,393 个专业</span></div>
|
||
<div class="cats" id="cats"></div>
|
||
</div>
|
||
|
||
<div class="note">
|
||
<div class="note-h">
|
||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><circle cx="12" cy="12" r="9"/><path d="M12 8v5M12 16.5v.01"/></svg>
|
||
数据口径
|
||
</div>
|
||
<div id="note-body">数据加载中…</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ 专业难度榜 ============ -->
|
||
<section class="view" id="v-rank">
|
||
<div class="wrap">
|
||
<div class="ph" id="rank-ph"></div>
|
||
<div class="tbar">
|
||
<div class="tbar-in">
|
||
<div class="seg" id="seg-sort">
|
||
<button data-sort="easy" class="on">好考优先</button>
|
||
<button data-sort="low">录取分低</button>
|
||
<button data-sort="big">招人多</button>
|
||
<button data-sort="hot">竞争最热</button>
|
||
</div>
|
||
<select class="sel" id="f-pv"><option value="">全部地区</option></select>
|
||
<select class="sel" id="f-lv">
|
||
<option value="">全部层次</option>
|
||
<option value="985">985</option>
|
||
<option value="211">211</option>
|
||
<option value="双一流">双一流</option>
|
||
<option value="双非">双非</option>
|
||
</select>
|
||
<span class="cnt" id="rank-cnt"></span>
|
||
</div>
|
||
<div class="chips" id="rank-tags">
|
||
<button class="chip" data-tag="">全部</button>
|
||
<button class="chip" data-tag="ln"><span class="dot" style="background:#039855"></span>可捡漏</button>
|
||
<button class="chip" data-tag="ok"><span class="dot" style="background:#026aa2"></span>过线就能上</button>
|
||
<button class="chip" data-tag="np"><span class="dot" style="background:#d92d20"></span>不保护一志愿</button>
|
||
<button class="chip" data-tag="yk"><span class="dot" style="background:#d92d20"></span>压分</button>
|
||
<button class="chip" data-tag="cold"><span class="dot" style="background:#039855"></span>偏冷</button>
|
||
<button class="chip" id="chip-all" data-tag="__all">含无评估数据</button>
|
||
</div>
|
||
</div>
|
||
<div id="rank-list"></div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ 估分择校 ============ -->
|
||
<section class="view" id="v-score">
|
||
<div class="wrap">
|
||
<div class="ph">
|
||
<div class="crumb"><a href="#/home">首页</a> / 估分择校</div>
|
||
<h1>我大概能考 <span style="color:var(--brand)">多少分</span>,能上哪</h1>
|
||
<p class="sub" style="margin-top:8px">以各硕士点<b>去年拟录取最低分</b>为基准,把你的估分分成冲刺、稳妥、保底三档。分数越准,方案越准。</p>
|
||
</div>
|
||
<div class="form">
|
||
<div class="form-row">
|
||
<div class="field">
|
||
<label>目标专业</label>
|
||
<div class="picked" id="score-major" tabindex="0">
|
||
<span id="score-major-txt"><em>点这里选一个专业</em></span>
|
||
<svg style="margin-left:auto;color:var(--ink-4)" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M6 9l6 6 6-6"/></svg>
|
||
</div>
|
||
<div class="hh">先定专业,再谈学校,跨专业比较没有意义</div>
|
||
</div>
|
||
<div class="field">
|
||
<label>预估总分</label>
|
||
<input id="score-val" type="number" inputmode="numeric" min="100" max="500" placeholder="如 320">
|
||
<div class="hh">按你目前模考的水平填,不必给自己加滤镜</div>
|
||
</div>
|
||
<button class="btn-primary" id="score-go" style="height:44px">生成方案</button>
|
||
</div>
|
||
</div>
|
||
<div id="score-result">
|
||
<div class="empty" style="margin-top:22px;border-style:solid;background:linear-gradient(180deg,#fff,#fbfcfe)">
|
||
<b>三步出结果</b>
|
||
<p>① 点「目标专业」在上方搜索框选一个专业 ② 填入你的预估总分 ③ 点「生成方案」<br>
|
||
结果会按冲刺 / 稳妥 / 保底三档,把每个硕士点的最低分和你的分差摆出来。</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ 院校库 ============ -->
|
||
<section class="view" id="v-schools">
|
||
<div class="wrap">
|
||
<div class="ph">
|
||
<div class="crumb"><a href="#/home">首页</a> / 院校库</div>
|
||
<h1>933 所院校,逐所看它难在哪</h1>
|
||
<p class="sub" style="margin-top:8px">同一所学校,冷门专业和死亡硕士点可能差 100 分。别只看校名。</p>
|
||
</div>
|
||
<div class="tbar">
|
||
<div class="tbar-in">
|
||
<select class="sel" id="s-pv"><option value="">全部地区</option></select>
|
||
<select class="sel" id="s-lv">
|
||
<option value="">全部层次</option>
|
||
<option value="985">985</option>
|
||
<option value="211">211</option>
|
||
<option value="双一流">双一流</option>
|
||
<option value="双非">双非</option>
|
||
</select>
|
||
<div class="seg" id="seg-sch">
|
||
<button data-ss="n" class="on">专业最多</button>
|
||
<button data-ss="cold">好考专业多</button>
|
||
<button data-ss="sc">竞争最热</button>
|
||
</div>
|
||
<span class="cnt" id="sch-cnt"></span>
|
||
</div>
|
||
</div>
|
||
<div class="rank" id="school-list" style="margin-top:14px"></div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ 院校详情 ============ -->
|
||
<section class="view" id="v-school">
|
||
<div class="wrap">
|
||
<div class="ph" id="school-ph"></div>
|
||
<div id="school-body"></div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ 对比 ============ -->
|
||
<section class="view" id="v-compare">
|
||
<div class="wrap">
|
||
<div class="ph">
|
||
<div class="crumb"><a href="#/home">首页</a> / 对比</div>
|
||
<h1>把纠结的几个硕士点摆一起看</h1>
|
||
<p class="sub" style="margin-top:8px">最多 4 个。在榜单里点「加入对比」,回来这里横向比较。</p>
|
||
</div>
|
||
<div id="cmp-body"></div>
|
||
</div>
|
||
</section>
|
||
</main>
|
||
|
||
<nav class="tabbar">
|
||
<div class="tabbar-in">
|
||
<a class="tab" href="#/home" data-nav="home">
|
||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 10.5L12 3l9 7.5"/><path d="M5 9.5V21h14V9.5"/></svg>首页</a>
|
||
<a class="tab" href="#/rank" data-nav="rank">
|
||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 19V5M4 19h16"/><path d="M8 16V10M12 16V7M16 16v-4"/></svg>难度榜</a>
|
||
<a class="tab" href="#/score" data-nav="score">
|
||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="8"/><circle cx="12" cy="12" r="3"/></svg>估分</a>
|
||
<a class="tab" href="#/schools" data-nav="schools">
|
||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 21V8l8-5 8 5v13"/><path d="M9 21v-6h6v6"/></svg>院校</a>
|
||
</div>
|
||
</nav>
|
||
|
||
<div class="mask" id="mask"></div>
|
||
<aside class="sheet" id="sheet" role="dialog" aria-modal="true" aria-labelledby="sheet-title">
|
||
<div class="sheet-hd">
|
||
<div style="flex:1;min-width:0">
|
||
<h3 id="sheet-title">—</h3>
|
||
<div class="sub" id="sheet-sub">—</div>
|
||
</div>
|
||
<button class="sheet-x" id="sheet-x" aria-label="关闭">
|
||
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M6 6l12 12M18 6L6 18"/></svg>
|
||
</button>
|
||
</div>
|
||
<div class="sheet-bd" id="sheet-bd"></div>
|
||
<div class="sheet-ft" id="sheet-ft"></div>
|
||
</aside>
|
||
|
||
<div class="cmpbar" id="cmpbar">
|
||
<span class="cn">已选 <b id="cmp-n">0</b> / 4</span>
|
||
<button class="cclr" id="cmp-clr">清空</button>
|
||
<button class="cgo" id="cmp-go">开始对比</button>
|
||
</div>
|
||
|
||
<script>
|
||
'use strict';
|
||
/* ========== 工具 ========== */
|
||
const $ = (s, r = document) => r.querySelector(s);
|
||
const $$ = (s, r = document) => Array.from(r.querySelectorAll(s));
|
||
const esc = s => String(s ?? '').replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
||
const fmt = n => (n === null || n === undefined || n === '') ? '—' : Number(n).toLocaleString('zh-CN');
|
||
const num1 = n => (n === null || n === undefined) ? '—' : (Math.round(n * 10) / 10);
|
||
|
||
// 静态截图模式:?still=1 时禁用动画、直接显示终值(便于评审与截图)
|
||
const STILL = /[?&]still=1/.test(location.search);
|
||
if (STILL) document.documentElement.classList.add('still');
|
||
|
||
const TAGNAME = { ln: '可捡漏', ok: '过线就能上', yk: '压分', np: '不保护一志愿', tj: '有调剂', ht: '火爆硕士点', sm: '招生少', fb: '复试比大', sb: '双非慎报', bk: '参考书多', zk: '专业课难', sw: '死亡硕士点', gf: '给分足' };
|
||
// 强信号标签:只突出对决策有直接影响的
|
||
const STRONG = ['ln', 'ok', 'yk', 'np', 'sw', 'fb', 'zk'];
|
||
const gradeCls = g => ({ '极热': 'g-极热', '偏热': 'g-偏热', '中性': 'g-中性', '偏冷': 'g-偏冷' }[g] || 'g-na');
|
||
|
||
/* ========== 状态 ========== */
|
||
const S = {
|
||
idx: null, sch: [], schMap: {}, majors: [], majorMap: {},
|
||
cur: null, scoreMajor: null, scoreVal: null, pending: null,
|
||
F: { sort: 'easy', pv: '', lv: '', tag: '', all: false },
|
||
SF: { pv: '', lv: '', sort: 'n' },
|
||
cmp: []
|
||
};
|
||
try { S.cmp = JSON.parse(localStorage.getItem('zx_cmp') || '[]') || []; } catch (e) { S.cmp = []; }
|
||
|
||
/* ========== 数据 ========== */
|
||
async function boot() {
|
||
try {
|
||
const [idx, sch, maj] = await Promise.all([
|
||
fetch('data/probe_index.json').then(r => r.json()),
|
||
fetch('data/school_probe.json').then(r => r.json()),
|
||
fetch('data/majors.json').then(r => r.json())
|
||
]);
|
||
S.idx = idx; S.majors = Array.isArray(maj) ? maj : (maj.majors || []);
|
||
S.sch = sch.schools;
|
||
S.majors.forEach(m => S.majorMap[m.code] = m);
|
||
sch.schools.forEach(s => S.schMap[s.sid] = s);
|
||
paintHome();
|
||
route();
|
||
} catch (e) {
|
||
console.error(e);
|
||
document.body.insertAdjacentHTML('afterbegin',
|
||
'<div style="padding:14px;background:#fef3f2;color:#b42318;font-size:13px">数据加载失败:' +
|
||
'请通过本地服务器访问(file:// 会被浏览器拦截),或确认 data/ 目录完整。</div>');
|
||
}
|
||
}
|
||
|
||
/* ========== 首页 ========== */
|
||
function paintHome() {
|
||
const o = S.idx.overview;
|
||
const stats = [
|
||
{ v: o.n_point, s: '个硕士点' },
|
||
{ v: o.n_school, s: '所院校' },
|
||
{ v: o.n_code, s: '个专业' },
|
||
{ v: o.n_tag, s: '条择校标签' }
|
||
];
|
||
const box = $('#hstats');
|
||
box.innerHTML = stats.map(x =>
|
||
`<div class="hstat"><b data-c="${x.v}">0</b><span>${x.s}</span></div>`).join('');
|
||
$$('[data-c]', box).forEach((el, i) => countUp(el, stats[i].v, i * 90));
|
||
|
||
const entries = [
|
||
{ main: true, href: '#/rank', ico: 'book', t: '按专业挑学校', d: '选定一个专业,直接看全国哪些学校好考、哪些是死亡硕士点', meta: fmt(o.n_code) + ' 个专业 · 覆盖 ' + fmt(o.n_school) + ' 校', go: '选专业' },
|
||
{ href: '#/score', ico: 'target', t: '按分数定方案', d: '输入估分,自动分冲刺 / 稳妥 / 保底', meta: fmt(o.n_admit) + ' 个硕士点有录取分', go: '估分' },
|
||
{ href: '#/schools', ico: 'building', t: '按院校查专业', d: '看一所学校里,哪个专业冷、哪个别碰', meta: fmt(o.n_school) + ' 所 · ' + fmt(o.n_scored) + ' 个专业有评估', go: '查院校' },
|
||
{ href: '#/rank', ico: 'spark', t: '捡漏与避坑', d: '可捡漏、过线就能上、压分、不保护一志愿', meta: fmt(o.n_tag) + ' 条择校标签', go: '看标签', tag: 'ln' },
|
||
{ href: '#/rank', ico: 'flask', t: '调剂与一志愿', d: '招不满的学校,往往就是你的机会', meta: '有调剂标记的硕士点', go: '看调剂', tag: 'tj' }
|
||
];
|
||
$('#entries').innerHTML = entries.map(e => `
|
||
<a class="entry${e.main ? ' main' : ''}" href="${e.href}"${e.tag ? ` data-tag="${e.tag}"` : ''}${e.pv ? ' data-pv="1"' : ''}>
|
||
<span class="e-ico">${icon(e.ico)}</span>
|
||
<h3>${e.t}</h3>
|
||
<p>${e.d}</p>
|
||
<div class="e-meta">${e.meta}
|
||
<span class="e-go">${e.go}<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path d="M5 12h13M13 6l6 6-6 6"/></svg></span>
|
||
</div>
|
||
</a>`).join('');
|
||
|
||
// 热门专业
|
||
const hot = S.idx.majors.slice(0, 8);
|
||
$('#hot-majors').innerHTML = hot.map(m => {
|
||
const tot = Math.max(m.n, 1);
|
||
const cold = m.cold, scored = Math.max(0, m.wsc - m.cold), na = Math.max(0, m.n - m.wsc);
|
||
return `<a class="mcard" href="#/major/${m.code}">
|
||
<div class="mc-top"><b>${esc(m.name)}</b><span class="mc-ml">${esc(m.ml || '—')}</span><span class="mc-code">${m.code}</span></div>
|
||
<div class="mc-bar" title="偏冷 ${cold} · 其余已评估 ${scored} · 暂无评估 ${na}">
|
||
<i class="c" style="width:${cold / tot * 100}%"></i>
|
||
<i class="h" style="width:${scored / tot * 100}%"></i>
|
||
<i class="na" style="width:${na / tot * 100}%"></i>
|
||
</div>
|
||
<div class="mc-bot"><b>${m.n}</b> 个硕士点
|
||
${m.pick ? `<span class="mc-pick">· ${m.pick} 个可捡漏</span>` : ''}
|
||
${m.med !== null ? `<span style="margin-left:auto">竞争 ${m.med}</span>` : ''}
|
||
</div>
|
||
</a>`;
|
||
}).join('');
|
||
|
||
// 快捷通道
|
||
const q = [
|
||
{ t: '我只考虑 211', lv: '211', c: '#1f4ae0' },
|
||
{ t: '双非想逆袭', tag: 'ln', c: '#039855' },
|
||
{ t: '想找过线就能上的', tag: 'ok', c: '#026aa2' },
|
||
{ t: '避开压分院校', tag: 'yk', c: '#d92d20' },
|
||
{ t: '避开不保护一志愿', tag: 'np', c: '#d92d20' },
|
||
{ t: '想留在江浙沪', pv: '江苏省', c: '#667085' },
|
||
{ t: '只想去北京', pv: '北京市', c: '#667085' },
|
||
{ t: '跨考求稳', tag: 'cold', c: '#039855' }
|
||
];
|
||
$('#quick').innerHTML = q.map(x =>
|
||
`<button class="qchip" data-quick${x.lv ? ` data-lv="${x.lv}"` : ''}${x.tag ? ` data-tag="${x.tag}"` : ''}${x.pv ? ` data-pv="${x.pv}"` : ''}>
|
||
<i style="background:${x.c}"></i>${x.t}</button>`).join('');
|
||
|
||
// 门类
|
||
const catMap = {};
|
||
S.majors.forEach(m => {
|
||
const k = m.ml || '其他';
|
||
catMap[k] = (catMap[k] || 0) + 1;
|
||
});
|
||
const order = ['哲学', '经济学', '法学', '教育学', '文学', '历史学', '理学', '工学', '农学', '医学', '军事学', '管理学', '艺术学', '交叉学科'];
|
||
$('#cats').innerHTML = order.filter(k => catMap[k]).map(k =>
|
||
`<button class="cat" data-cat="${esc(k)}"><b>${esc(k)}</b><span>${catMap[k]}</span></button>`).join('');
|
||
|
||
// 口径
|
||
$('#note-body').innerHTML =
|
||
`共 <b>${fmt(o.n_point)}</b> 个硕士点(校 × 院系 × 专业,同校同专业多院系分开计),` +
|
||
`其中 <b>${fmt(o.n_scored)}</b> 个有平台竞争评估、<b>${fmt(o.n_admit)}</b> 个有拟录取最低分。<br>` +
|
||
`「竞争分 0–100」与「偏冷/中性/偏热/极热」是平台基于报录、调剂、分数分布测算的相对热度,` +
|
||
`<b>不是官方指标</b>;录取最低分、复试最低分、录取人数为源页实测值,缺失时显示「—」而非 0。<br>` +
|
||
`默认榜单只展示有评估数据的硕士点,可用「含无评估数据」开关查看全部。2027 招生目录(计划数、考试科目)在院校详情中单独标注。`;
|
||
}
|
||
|
||
function countUp(el, target, delay) {
|
||
if (STILL) { el.textContent = target.toLocaleString('zh-CN'); return; }
|
||
const dur = 900, t0 = performance.now() + (delay || 0);
|
||
function tick(t) {
|
||
const p = Math.min(1, Math.max(0, (t - t0) / dur));
|
||
const e = 1 - Math.pow(1 - p, 3);
|
||
el.textContent = Math.round(target * e).toLocaleString('zh-CN');
|
||
if (p < 1) requestAnimationFrame(tick);
|
||
}
|
||
requestAnimationFrame(tick);
|
||
}
|
||
|
||
function icon(n) {
|
||
const p = {
|
||
book: '<path d="M4 5.5A2.5 2.5 0 016.5 3H19v18H6.5A2.5 2.5 0 014 18.5v-13z"/><path d="M8 3v18"/>',
|
||
target: '<circle cx="12" cy="12" r="8"/><circle cx="12" cy="12" r="3.2"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3"/>',
|
||
building: '<path d="M4 21V8l8-4.5L20 8v13"/><path d="M9 21v-6h6v6"/><path d="M4 21h16"/>',
|
||
spark: '<path d="M12 3l1.9 5.6L19.5 10l-5.6 1.9L12 17.5 10.1 11.9 4.5 10l5.6-1.4L12 3z"/><path d="M18 16l.9 2.6L21 19.5l-2.1.9L18 23"/>',
|
||
compass: '<circle cx="12" cy="12" r="9"/><path d="M15.5 8.5l-2 5-5 2 2-5 5-2z"/>',
|
||
flask: '<path d="M9 3h6M10 3v6.5L4.8 18a2 2 0 001.7 3h11a2 2 0 001.7-3L14 9.5V3"/><path d="M7.5 15h9"/>'
|
||
}[n] || '';
|
||
return `<svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round">${p}</svg>`;
|
||
}
|
||
|
||
/* ========== 路由 ========== */
|
||
function route() {
|
||
const h = (location.hash || '#/home').replace(/^#\/?/, '');
|
||
const seg = h.split('/');
|
||
const p1 = seg[0] || 'home';
|
||
$$('.view').forEach(v => v.classList.remove('on'));
|
||
$$('[data-nav]').forEach(a => a.classList.toggle('on', a.dataset.nav === p1));
|
||
window.scrollTo(0, 0);
|
||
|
||
if (p1 === 'home') { $('#v-home').classList.add('on'); }
|
||
else if (p1 === 'rank') {
|
||
$('#v-rank').classList.add('on');
|
||
if (!S.cur) openRank(null);
|
||
else { applyPending(); renderRank(); }
|
||
}
|
||
else if (p1 === 'major') {
|
||
$('#v-rank').classList.add('on');
|
||
openRank(seg[1]);
|
||
}
|
||
else if (p1 === 'score') { $('#v-score').classList.add('on'); }
|
||
else if (p1 === 'schools') { $('#v-schools').classList.add('on'); paintSchools(); }
|
||
else if (p1 === 'school') { $('#v-school').classList.add('on'); openSchool(seg[1]); }
|
||
else if (p1 === 'compare') { $('#v-compare').classList.add('on'); paintCompare(); }
|
||
else { location.hash = '#/home'; }
|
||
}
|
||
|
||
/* ========== 专业榜 ========== */
|
||
async function openRank(code) {
|
||
if (!code) code = '085400';
|
||
if (S.cur && S.cur.code === code) { renderRank(); return; }
|
||
$('#rank-list').innerHTML = skeletonRows(6);
|
||
try {
|
||
const d = await fetch('data/probe/' + code + '.json').then(r => r.json());
|
||
S.cur = d;
|
||
if (location.hash !== '#/major/' + code && location.hash !== '#/rank') history.replaceState(null, '', '#/major/' + code);
|
||
} catch (e) {
|
||
S.cur = null;
|
||
$('#rank-list').innerHTML = '<div class="empty"><b>没找到这个专业</b><p>换个专业名或代码试试</p></div>';
|
||
return;
|
||
}
|
||
// 地区下拉
|
||
const pvs = [...new Set(S.cur.rows.map(r => r.pv).filter(Boolean))].sort();
|
||
$('#f-pv').innerHTML = '<option value="">全部地区</option>' + pvs.map(p => `<option value="${esc(p)}">${esc(p)}</option>`).join('');
|
||
// 切专业默认重置筛选;若来自首页入口则套用它带的条件
|
||
S.F.pv = ''; S.F.lv = ''; S.F.tag = ''; S.F.all = false;
|
||
$$('#rank-tags .chip').forEach(c => c.classList.remove('on'));
|
||
$('#rank-tags .chip[data-tag=""]').classList.add('on');
|
||
applyPending();
|
||
renderRank();
|
||
}
|
||
|
||
// 从首页入口/快捷通道跳到榜单,带着条件;数据没加载完也不会丢
|
||
function goRank(opts) {
|
||
S.pending = opts || {};
|
||
const same = /^#\/(rank|major)/.test(location.hash || '');
|
||
if (same) {
|
||
if (!S.cur) openRank(null);
|
||
else { applyPending(); renderRank(); }
|
||
} else {
|
||
location.hash = '#/rank';
|
||
}
|
||
}
|
||
|
||
function applyPending() {
|
||
if (!S.pending) return false;
|
||
S.F.pv = S.pending.pv || '';
|
||
S.F.lv = S.pending.lv || '';
|
||
S.F.tag = S.pending.tag || '';
|
||
S.F.all = !!S.pending.all;
|
||
S.pending = null;
|
||
// 同步控件,避免"条件生效了但控件还显示全部"
|
||
if ($('#f-pv')) $('#f-pv').value = S.F.pv;
|
||
if ($('#f-lv')) $('#f-lv').value = S.F.lv;
|
||
$$('#rank-tags .chip').forEach(c => {
|
||
const t = c.dataset.tag || '';
|
||
if (t === '__all') c.classList.toggle('on', S.F.all);
|
||
else c.classList.toggle('on', t === S.F.tag);
|
||
});
|
||
return true;
|
||
}
|
||
|
||
function filteredRows() {
|
||
const d = S.cur; if (!d) return [];
|
||
return d.rows.filter(r => {
|
||
if (!S.F.all && r.sc === null && r.img === null) return false;
|
||
if (S.F.pv && r.pv !== S.F.pv) return false;
|
||
if (S.F.lv && r.lv !== S.F.lv) return false;
|
||
if (S.F.tag === 'cold') { if (r.gr !== '偏冷') return false; }
|
||
else if (S.F.tag && !(r.tg || []).includes(S.F.tag)) return false;
|
||
return true;
|
||
});
|
||
}
|
||
|
||
function sortRows(rows) {
|
||
const s = S.F.sort;
|
||
const a = rows.slice();
|
||
const nil = v => v === null || v === undefined;
|
||
if (s === 'low') a.sort((x, y) => (nil(x.img) - nil(y.img)) || (x.img || 9999) - (y.img || 9999) || (nil(x.sc) ? 1 : 0) - (nil(y.sc) ? 1 : 0) || (x.sc ?? 999) - (y.sc ?? 999));
|
||
else if (s === 'big') a.sort((x, y) => (y.ic || 0) - (x.ic || 0));
|
||
else if (s === 'hot') a.sort((x, y) => (nil(y.sc) - nil(x.sc)) || (y.sc || -1) - (x.sc || -1));
|
||
else a.sort((x, y) => (nil(x.sc) - nil(y.sc)) || (x.sc ?? 999) - (y.sc ?? 999) || (nil(x.img) - nil(y.img)) || (x.img || 9999) - (y.img || 9999));
|
||
return a;
|
||
}
|
||
|
||
function renderRank() {
|
||
const d = S.cur; if (!d) return;
|
||
const rows = sortRows(filteredRows());
|
||
const withSc = d.rows.filter(r => r.sc !== null).length;
|
||
const withImg = d.rows.filter(r => r.img !== null).length;
|
||
const imgs = d.rows.map(r => r.img).filter(v => v !== null);
|
||
const scs = d.rows.map(r => r.sc).filter(v => v !== null);
|
||
const cold = d.rows.filter(r => r.gr === '偏冷').length;
|
||
const pick = d.rows.filter(r => (r.tg || []).some(t => t === 'ln' || t === 'ok')).length;
|
||
|
||
$('#rank-ph').innerHTML = `
|
||
<div class="crumb"><a href="#/home">首页</a> / <a href="#/rank">专业难度榜</a> / ${esc(d.name)}</div>
|
||
<h1>${esc(d.name)} <span class="code">${d.code}</span>
|
||
${d.ml ? `<span class="code" style="background:var(--brand-50);color:var(--brand-600)">${esc(d.ml)}</span>` : ''}
|
||
<button class="switch-major" onclick="jumpSearch()">
|
||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M7 4v13M7 17l-3-3M7 17l3-3"/><path d="M17 20V7M17 7l-3 3M17 7l3 3"/></svg>
|
||
换个专业</button></h1>
|
||
<p class="sub">全国 <b>${fmt(d.n)}</b> 个硕士点开设,其中 <b>${fmt(withSc)}</b> 个有竞争评估、<b>${fmt(withImg)}</b> 个查得到录取最低分。
|
||
${pick ? `标记「可捡漏」的有 <b>${pick}</b> 个。` : ''}</p>
|
||
<div class="kpis">
|
||
<div class="kpi"><b>${imgs.length ? Math.min(...imgs) : '—'}</b><i>最低录取分(全国)</i></div>
|
||
<div class="kpi"><b>${imgs.length ? Math.max(...imgs) : '—'}</b><i>最高录取分(全国)</i></div>
|
||
<div class="kpi b"><b>${scs.length ? num1(scs.reduce((a, b) => a + b, 0) / scs.length) : '—'}</b><i>平均竞争分</i></div>
|
||
<div class="kpi"><b style="color:var(--cool)">${cold}</b><i>偏冷档硕士点</i></div>
|
||
</div>
|
||
${(function () {
|
||
// 洞察只基于当前筛选后的列表,避免"说 252 分、列表第一却是 264 分"的口径打架
|
||
const vis = rows;
|
||
const visImg = vis.map(r => r.img).filter(v => v !== null);
|
||
const lowRow = vis.filter(r => r.img !== null).sort((a, b) => a.img - b.img)[0];
|
||
const visCold = vis.filter(r => r.gr === '偏冷').length;
|
||
const visPick = vis.filter(r => (r.tg || []).some(t => t === 'ln' || t === 'ok')).length;
|
||
const parts = [];
|
||
parts.push(`全国 <b>${fmt(d.n)}</b> 个硕士点开设${esc(d.name)}`);
|
||
if (vis.length < d.n) parts.push(`当前筛出 <b>${vis.length}</b> 个`);
|
||
// 用区间而不是"最低分(某校)",否则会与按竞争分排序的列表首位打架
|
||
if (visImg.length > 1) parts.push(`录取分区间 <span class="hl">${Math.min(...visImg)}–${Math.max(...visImg)} 分</span>`);
|
||
else if (visImg.length === 1) parts.push(`录取分 <span class="hl">${visImg[0]} 分</span>`);
|
||
if (visCold) parts.push(`<span class="g">${visCold} 个偏冷档</span>`);
|
||
if (visPick) parts.push(`<b>${visPick} 个</b>标记可捡漏`);
|
||
return `<div class="insight">
|
||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><path d="M12 3v2M12 19v2M3 12h2M19 12h2"/><circle cx="12" cy="12" r="4.2"/></svg>
|
||
<div>${parts.join(',')}。按「好考优先」从低到高排,往下越难。</div>
|
||
</div>`;
|
||
})()}`;
|
||
|
||
$('#rank-cnt').textContent = '筛出 ' + rows.length + ' / ' + d.n + ' 个硕士点';
|
||
if (!rows.length) {
|
||
$('#rank-list').innerHTML = '<div class="empty"><b>这个条件下没有结果</b><p>试试放宽地区或层次,或打开「含无评估数据」</p></div>';
|
||
return;
|
||
}
|
||
$('#rank-list').innerHTML = '<ol class="rank">' + rows.map((r, i) => rowHTML(r, i + 1)).join('') + '</ol>';
|
||
}
|
||
|
||
const GRADE_COLOR = { '极热': '#d92d20', '偏热': '#dc6803', '中性': '#cbd5e1', '偏冷': '#039855' };
|
||
function rowHTML(r, idx) {
|
||
const tg = (r.tg || []).filter(t => STRONG.includes(t)).slice(0, 3);
|
||
const rkCls = idx <= 3 ? ' t' + idx : '';
|
||
return `<li class="rrow" style="--gs:${GRADE_COLOR[r.gr] || '#e4e8f0'}" data-sid="${r.sid}"
|
||
data-code="${S.cur ? S.cur.code : ''}" data-sname="${esc(r.sch)}" data-xy="${esc(r.xy || '')}" data-i="${idx}">
|
||
<div class="rk${rkCls}">${idx}</div>
|
||
<div style="min-width:0">
|
||
<div class="rt"><b>${esc(r.sch)}</b><span class="lv lv-${esc(r.lv)}">${esc(r.lv)}</span></div>
|
||
<div class="rs">${esc(r.xy || '不区分院系')}${r.pv ? `<span class="sep">·</span>${esc(r.pv)}` : ''}</div>
|
||
${tg.length ? `<div class="rtags">${tg.map(t => `<span class="tag t-${t}">${TAGNAME[t]}</span>`).join('')}</div>` : ''}
|
||
</div>
|
||
<div class="rmets">
|
||
<div class="hi"><b>${fmt(r.img)}</b><i>录取最低分</i></div>
|
||
<div><b>${r.ic ? fmt(r.ic) : '—'}</b><i>录取人数</i></div>
|
||
<div><b>${r.sc === null ? '—' : num1(r.sc)}</b><i>竞争分</i></div>
|
||
</div>
|
||
<div class="grade ${gradeCls(r.gr)}">${r.gr || '无评估'}</div>
|
||
${spark(r.yo)}
|
||
</li>`;
|
||
}
|
||
|
||
function spark(yo) {
|
||
const vals = (yo || []).map(x => Array.isArray(x) ? x[1] : 0).filter(v => v > 0);
|
||
if (vals.length < 2) return '<svg class="spark" viewBox="0 0 62 26"></svg>';
|
||
const pts = (yo || []).map((x, i) => [i, Array.isArray(x) ? (x[1] || 0) : 0]);
|
||
const max = Math.max(...pts.map(p => p[1]), 1), min = Math.min(...pts.filter(p => p[1] > 0).map(p => p[1]), max);
|
||
const w = 62, h = 26, pad = 3;
|
||
const X = i => pad + i * (w - pad * 2) / 3;
|
||
const Y = v => v <= 0 ? h - pad : h - pad - (v - min) / Math.max(max - min, 1) * (h - pad * 2);
|
||
let d = '', started = false;
|
||
pts.forEach(([i, v]) => {
|
||
if (v > 0) { d += (started ? 'L' : 'M') + X(i).toFixed(1) + ' ' + Y(v).toFixed(1) + ' '; started = true; }
|
||
else started = false;
|
||
});
|
||
return `<svg class="spark" viewBox="0 0 62 26" aria-hidden="true">
|
||
<path d="${d}" fill="none" stroke="#2b5cff" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||
${pts.filter(p => p[1] > 0).map(p => `<circle cx="${X(p[0]).toFixed(1)}" cy="${Y(p[1]).toFixed(1)}" r="1.5" fill="#2b5cff"/>`).join('')}
|
||
</svg>`;
|
||
}
|
||
|
||
function skeletonRows(n) {
|
||
return '<div style="display:flex;flex-direction:column;gap:7px;margin-top:10px">' +
|
||
Array.from({ length: n }).map(() => '<div class="skel" style="height:74px;border-radius:12px"></div>').join('') + '</div>';
|
||
}
|
||
|
||
/* ========== 院校库 ========== */
|
||
function paintSchools() {
|
||
const pvs = [...new Set(S.sch.map(s => s.pv).filter(Boolean))].sort();
|
||
if ($('#s-pv').options.length <= 1)
|
||
$('#s-pv').innerHTML = '<option value="">全部地区</option>' + pvs.map(p => `<option value="${esc(p)}">${esc(p)}</option>`).join('');
|
||
let list = S.sch.filter(s => (!S.SF.pv || s.pv === S.SF.pv) && (!S.SF.lv || s.lv === S.SF.lv));
|
||
const so = S.SF.sort;
|
||
if (so === 'cold') list.sort((a, b) => b.cold - a.cold || b.pick - a.pick);
|
||
else if (so === 'sc') list.sort((a, b) => (b.sc ?? -1) - (a.sc ?? -1));
|
||
else list.sort((a, b) => b.n - a.n);
|
||
$('#sch-cnt').textContent = list.length + ' 所';
|
||
$('#school-list').innerHTML = list.slice(0, 200).map(s => `
|
||
<a class="rrow" href="#/school/${s.sid}" style="grid-template-columns:minmax(0,1fr) 210px 74px">
|
||
<div style="min-width:0">
|
||
<div class="rt"><b>${esc(s.name)}</b><span class="lv lv-${esc(s.lv)}">${esc(s.lv)}</span></div>
|
||
<div class="rs">${esc(s.pv || '—')}<span class="sep">·</span>${s.n} 个硕士点${s.pick ? `<span class="sep">·</span><span style="color:var(--cool);font-weight:700">${s.pick} 个可捡漏</span>` : ''}</div>
|
||
</div>
|
||
<div class="rmets">
|
||
<div class="hi"><b>${s.img !== null ? fmt(s.img) : '—'}</b><i>最低录取分</i></div>
|
||
<div><b>${s.sc !== null ? num1(s.sc) : '—'}</b><i>平均竞争分</i></div>
|
||
<div><b style="color:var(--cool)">${s.cold}</b><i>偏冷专业</i></div>
|
||
</div>
|
||
<div class="grade" style="background:transparent;color:var(--ink-4)">查看 →</div>
|
||
</a>`).join('');
|
||
if (list.length > 200) $('#school-list').insertAdjacentHTML('beforeend',
|
||
`<div style="text-align:center;font-size:12.5px;color:var(--ink-4);padding:14px">仅显示前 200 所,请用地区/层次缩小范围</div>`);
|
||
}
|
||
|
||
/* ========== 院校详情 ========== */
|
||
async function openSchool(sid) {
|
||
if (!sid) return;
|
||
$('#school-ph').innerHTML = '<div class="skel" style="height:120px"></div>';
|
||
$('#school-body').innerHTML = skeletonRows(5);
|
||
let d;
|
||
try { d = await fetch('data/school/' + sid + '.json').then(r => r.json()); }
|
||
catch (e) { $('#school-body').innerHTML = '<div class="empty"><b>没有这所院校的数据</b></div>'; return; }
|
||
const rows = d.rows;
|
||
const withSc = rows.filter(r => r.sc !== null);
|
||
const cold = rows.filter(r => r.gr === '偏冷');
|
||
const hot = rows.filter(r => r.gr === '极热' || r.gr === '偏热');
|
||
const img = rows.map(r => r.img).filter(v => v !== null);
|
||
const avg = withSc.length ? withSc.reduce((a, b) => a + b.sc, 0) / withSc.length : null;
|
||
|
||
$('#school-ph').innerHTML = `
|
||
<div class="crumb"><a href="#/home">首页</a> / <a href="#/schools">院校库</a> / ${esc(d.name)}</div>
|
||
<h1>${esc(d.name)} <span class="lv lv-${esc(d.lv)}" style="font-size:12px;padding:3px 8px">${esc(d.lv)}</span></h1>
|
||
<p class="sub">${esc(d.pv || '—')} · 共 <b>${rows.length}</b> 个硕士点,
|
||
其中 <b>${withSc.length}</b> 个有竞争评估、<b>${rows.filter(r => r.img !== null).length}</b> 个查得到录取分</p>
|
||
${withSc.length < rows.length * 0.4 ? `<div class="insight" style="background:linear-gradient(100deg,#fffaeb,#fff)">
|
||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#b54708" stroke-width="2.2"><circle cx="12" cy="12" r="9"/><path d="M12 8v5M12 16.5v.01"/></svg>
|
||
<div>这所学校的评估数据只覆盖 <b>${withSc.length}</b> / ${rows.length} 个专业。
|
||
下面优先列出有数据的;标「无评估」的仅表示平台暂无该硕士点的竞争分析,<b>不代表好考</b>。</div>
|
||
</div>` : ''}
|
||
<div class="kpis">
|
||
<div class="kpi b"><b>${avg !== null ? num1(avg) : '—'}</b><i>平均竞争分</i></div>
|
||
<div class="kpi"><b style="color:var(--cool)">${cold.length}</b><i>偏冷专业</i></div>
|
||
<div class="kpi"><b style="color:var(--hot)">${hot.length}</b><i>偏热/极热专业</i></div>
|
||
<div class="kpi"><b>${img.length ? fmt(Math.min(...img)) : '—'}</b><i>最低录取分</i></div>
|
||
</div>`;
|
||
|
||
const sec = (title, sub, arr) => `
|
||
<div class="sec"><div class="sec-hd"><h2 style="font-size:16px">${title}</h2><span>${sub}</span></div>
|
||
<div class="rank" style="margin-top:8px">${arr.map(r => `
|
||
<div class="rrow" data-sid="${sid}" data-code="${r.code}" data-sname="${esc(d.name)}" data-xy="${esc(r.xy)}"
|
||
style="--gs:${GRADE_COLOR[r.gr] || '#e4e8f0'};grid-template-columns:minmax(0,1fr) 200px 70px">
|
||
<div style="min-width:0">
|
||
<div class="rt"><b>${esc(r.name)}</b><span class="mc-code">${r.code}</span></div>
|
||
<div class="rs">${esc(r.xy || '不区分院系')}${r.ml ? `<span class="sep">·</span>${esc(r.ml)}` : ''}</div>
|
||
${(r.tg || []).filter(t => STRONG.includes(t)).length ? `<div class="rtags">${r.tg.filter(t => STRONG.includes(t)).slice(0, 3).map(t => `<span class="tag t-${t}">${TAGNAME[t]}</span>`).join('')}</div>` : ''}
|
||
</div>
|
||
<div class="rmets">
|
||
<div class="hi"><b>${fmt(r.img)}</b><i>录取最低分</i></div>
|
||
<div><b>${r.ic ? r.ic : '—'}</b><i>录取人数</i></div>
|
||
<div><b>${r.sc === null ? '—' : num1(r.sc)}</b><i>竞争分</i></div>
|
||
</div>
|
||
<div class="grade ${gradeCls(r.gr)}">${r.gr || '无评估'}</div>
|
||
</div>`).join('')}</div></div>`;
|
||
|
||
const rest = rows.filter(r => !['偏冷', '偏热', '极热'].includes(r.gr));
|
||
let html = '';
|
||
if (cold.length) html += sec('这所学校最好考的专业', '偏冷档,竞争分低于 35', cold.slice(0, 12));
|
||
if (hot.length) html += sec('竞争最激烈的专业', '偏热与极热档,慎报', hot.slice(0, 10));
|
||
if (rest.length) html += sec('其余专业', '中性档与暂无评估,点开看是否有录取分', rest.slice(0, 60));
|
||
if (rows.length > 60) html += `<div style="text-align:center;font-size:12.5px;color:var(--ink-4);padding:14px">
|
||
仅显示前 60 个,共 ${rows.length} 个专业</div>`;
|
||
$('#school-body').innerHTML = html;
|
||
}
|
||
|
||
/* ========== 检查抽屉 ========== */
|
||
async function openSheet(sid, code, sname, xy) {
|
||
const sh = $('#sheet');
|
||
$('#sheet-title').textContent = sname || '';
|
||
$('#sheet-sub').textContent = xy ? xy + ' · ' + code : code;
|
||
$('#sheet-bd').innerHTML = skeletonRows(3);
|
||
$('#sheet-ft').innerHTML = '';
|
||
sh.classList.add('on'); $('#mask').classList.add('on');
|
||
document.body.style.overflow = 'hidden';
|
||
|
||
let d = null;
|
||
try { d = await fetch('data/probe/' + code + '.json').then(r => r.json()); } catch (e) { }
|
||
const r = d ? d.rows.find(x => String(x.sid) === String(sid) && (!xy || x.xy === xy)) : null;
|
||
if (!r) {
|
||
$('#sheet-bd').innerHTML = '<div class="empty"><b>没有找到该硕士点的详细记录</b></div>';
|
||
return;
|
||
}
|
||
const years = [2023, 2024, 2025, 2026];
|
||
const yrows = (r.yo || []).map((v, i) => {
|
||
const ln = Array.isArray(v) ? v[0] : 0, mn = Array.isArray(v) ? v[1] : 0;
|
||
return { y: years[i], ln, mn };
|
||
});
|
||
const hasY = yrows.some(x => x.ln || x.mn);
|
||
|
||
$('#sheet-bd').innerHTML = `
|
||
<div class="sgrid">
|
||
<div class="sbox"><i>拟录取最低分</i><b style="color:var(--brand)">${fmt(r.img)}</b></div>
|
||
<div class="sbox"><i>拟录取最高分</i><b>${fmt(r.imx)}</b></div>
|
||
<div class="sbox"><i>进复试最低分</i><b>${fmt(r.ifm)}</b></div>
|
||
<div class="sbox"><i>录取人数</i><b>${r.ic ? fmt(r.ic) : '—'}</b></div>
|
||
<div class="sbox"><i>竞争分(0-100)</i><b>${r.sc === null ? '—' : num1(r.sc)}</b></div>
|
||
<div class="sbox"><i>竞争分档</i><b style="font-size:16px;color:${r.gr === '偏冷' ? 'var(--cool)' : r.gr === '偏热' || r.gr === '极热' ? 'var(--hot)' : 'var(--ink-2)'}">${r.gr || '无评估'}</b></div>
|
||
</div>
|
||
${(r.tg || []).length ? `<div class="s-t">择校标签</div><div class="tagline">${r.tg.map(t => `<span class="tagx ${t}">${TAGNAME[t]}</span>`).join('')}</div>` : ''}
|
||
${hasY ? `<div class="s-t">近四年分数走势</div>
|
||
<table class="yr"><thead><tr><th>年份</th><th>录取人数</th><th>最低分</th></tr></thead><tbody>
|
||
${yrows.map(x => `<tr><td>${x.y}</td><td>${x.ln || '—'}</td><td>${x.mn || '—'}</td></tr>`).join('')}
|
||
</tbody></table>` : ''}
|
||
<div class="s-t">数据来源与口径</div>
|
||
<div style="font-size:12.5px;color:var(--ink-3);line-height:1.75">
|
||
录取分、复试分、录取人数为该硕士点源页实测值;竞争分与分档为平台测算,仅用于横向比较,
|
||
<b>不代表上岸难度绝对值</b>。缺失显示「—」,不按 0 处理。
|
||
</div>`;
|
||
|
||
$('#sheet-ft').innerHTML = `
|
||
<a class="btn-ghost" href="#/major/${code}" onclick="closeSheet()">看同专业全国榜单</a>
|
||
<button class="btn-primary" id="sheet-cmp">加入对比</button>`;
|
||
$('#sheet-cmp').onclick = () => { addCmp({ code, sid, sch: r.sch, xy: r.xy, name: d.name, img: r.img, sc: r.sc, gr: r.gr, ic: r.ic }); };
|
||
}
|
||
|
||
function closeSheet() {
|
||
$('#sheet').classList.remove('on'); $('#mask').classList.remove('on');
|
||
document.body.style.overflow = '';
|
||
}
|
||
|
||
/* ========== 对比 ========== */
|
||
function addCmp(o) {
|
||
if (S.cmp.find(x => x.code === o.code && String(x.sid) === String(o.sid) && x.xy === o.xy)) {
|
||
toast('已经在对比里了');
|
||
return;
|
||
}
|
||
if (S.cmp.length >= 4) { toast('最多对比 4 个,先移除一个'); return; }
|
||
S.cmp.push(o);
|
||
localStorage.setItem('zx_cmp', JSON.stringify(S.cmp));
|
||
paintCmpBar();
|
||
toast('已加入对比');
|
||
}
|
||
function paintCmpBar() {
|
||
const bar = $('#cmpbar');
|
||
$('#cmp-n').textContent = S.cmp.length;
|
||
bar.classList.toggle('on', S.cmp.length > 0);
|
||
}
|
||
function paintCompare() {
|
||
if (!S.cmp.length) {
|
||
$('#cmp-body').innerHTML = '<div class="empty"><b>还没有选择对比对象</b><p>去专业难度榜里,点任意一行「加入对比」,最多 4 个</p></div>';
|
||
return;
|
||
}
|
||
const F = [
|
||
{ k: 'sch', t: '院校' }, { k: 'xy', t: '院系' }, { k: 'name', t: '专业' },
|
||
{ k: 'img', t: '录取最低分', best: 'min' }, { k: 'ic', t: '录取人数', best: 'max' },
|
||
{ k: 'sc', t: '竞争分', best: 'min' }, { k: 'gr', t: '竞争分档' }
|
||
];
|
||
const bestVal = k => {
|
||
const vals = S.cmp.map(x => x[k]).filter(v => v !== null && v !== undefined && v !== '');
|
||
if (!vals.length) return null;
|
||
const f = F.find(x => x.k === k);
|
||
return f && f.best === 'min' ? Math.min(...vals) : Math.max(...vals);
|
||
};
|
||
$('#cmp-body').innerHTML = `
|
||
<div class="cmpwrap"><table class="cmpt">
|
||
<thead><tr><th></th>${S.cmp.map((x, i) => `<th>${esc(x.sch)}<br><span class="cmpt-x" data-rm="${i}" style="cursor:pointer">移除</span></th>`).join('')}</tr></thead>
|
||
<tbody>
|
||
${F.map(f => `<tr><th>${f.t}</th>${S.cmp.map(x => {
|
||
const v = x[f.k];
|
||
const isBest = f.best && v !== null && v !== undefined && v === bestVal(f.k);
|
||
return `<td${isBest ? ' class="best"' : ''}>${f.best ? `<b>${v === null || v === undefined ? '—' : num1(v)}</b>` : esc(v ?? '—')}</td>`;
|
||
}).join('')}</tr>`).join('')}
|
||
</tbody></table></div>
|
||
<div style="margin-top:14px;display:flex;gap:9px">
|
||
<a class="btn-ghost" href="#/rank">继续挑选</a>
|
||
<button class="btn-ghost" id="cmp-clear2">清空对比</button>
|
||
</div>`;
|
||
$$('[data-rm]').forEach(b => b.onclick = () => {
|
||
S.cmp.splice(+b.dataset.rm, 1);
|
||
localStorage.setItem('zx_cmp', JSON.stringify(S.cmp));
|
||
paintCmpBar(); paintCompare();
|
||
});
|
||
$('#cmp-clear2').onclick = () => { S.cmp = []; localStorage.setItem('zx_cmp', '[]'); paintCmpBar(); paintCompare(); };
|
||
}
|
||
|
||
function toast(msg) {
|
||
let t = $('#toast');
|
||
if (!t) {
|
||
t = document.createElement('div');
|
||
t.id = 'toast';
|
||
t.style.cssText = 'position:fixed;left:50%;bottom:80px;transform:translate(-50%,10px);background:#101828;color:#fff;' +
|
||
'padding:9px 16px;border-radius:10px;font-size:13px;font-weight:600;z-index:200;opacity:0;transition:.2s;pointer-events:none';
|
||
document.body.appendChild(t);
|
||
}
|
||
t.textContent = msg;
|
||
t.style.opacity = '1'; t.style.transform = 'translate(-50%,0)';
|
||
clearTimeout(t._t);
|
||
t._t = setTimeout(() => { t.style.opacity = '0'; t.style.transform = 'translate(-50%,10px)'; }, 1600);
|
||
}
|
||
|
||
/* ========== 搜索 ========== */
|
||
function bindSearch() {
|
||
const inp = $('#q'), drop = $('#sdrop');
|
||
let items = [], act = -1;
|
||
|
||
function search(q) {
|
||
q = q.trim().toLowerCase();
|
||
if (!q) return [];
|
||
const out = [];
|
||
S.majors.forEach(m => {
|
||
if (m.name.toLowerCase().includes(q) || m.code.includes(q)) out.push({ t: 'major', code: m.code, name: m.name, sub: m.ml, n: m.n_school });
|
||
});
|
||
S.sch.forEach(s => {
|
||
if (s.name.toLowerCase().includes(q)) out.push({ t: 'school', sid: s.sid, name: s.name, sub: s.pv + ' · ' + s.lv, n: s.n });
|
||
});
|
||
out.sort((a, b) => (a.t === b.t ? 0 : a.t === 'major' ? -1 : 1));
|
||
return out.slice(0, 12);
|
||
}
|
||
|
||
function paint(list) {
|
||
items = list; act = -1;
|
||
if (!list.length) { drop.classList.remove('on'); return; }
|
||
const majors = list.filter(x => x.t === 'major'), schools = list.filter(x => x.t === 'school');
|
||
let h = '';
|
||
if (majors.length) {
|
||
h += '<div class="sdrop-h">专业</div>' + majors.map(x =>
|
||
`<div class="sitem" data-t="major" data-code="${x.code}"><b>${esc(x.name)}</b>
|
||
<span class="ct">${esc(x.sub || '')}</span><span class="sc">${x.code} · ${x.n} 校</span></div>`).join('');
|
||
}
|
||
if (schools.length) {
|
||
h += '<div class="sdrop-h">院校</div>' + schools.map(x =>
|
||
`<div class="sitem" data-t="school" data-sid="${x.sid}"><b>${esc(x.name)}</b>
|
||
<span class="ct">${esc(x.sub || '')}</span><span class="sc">${x.n} 个硕士点</span></div>`).join('');
|
||
}
|
||
drop.innerHTML = h; drop.classList.add('on');
|
||
}
|
||
|
||
inp.addEventListener('input', () => paint(search(inp.value)));
|
||
inp.addEventListener('focus', () => { if (inp.value.trim()) paint(search(inp.value)); });
|
||
inp.addEventListener('keydown', e => {
|
||
const nodes = $$('.sitem', drop);
|
||
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
||
e.preventDefault();
|
||
act = Math.max(0, Math.min(nodes.length - 1, act + (e.key === 'ArrowDown' ? 1 : -1)));
|
||
nodes.forEach((n, i) => n.classList.toggle('act', i === act));
|
||
} else if (e.key === 'Enter') {
|
||
const n = nodes[act] || nodes[0];
|
||
if (n) n.click();
|
||
} else if (e.key === 'Escape') { drop.classList.remove('on'); inp.blur(); }
|
||
});
|
||
drop.addEventListener('click', e => {
|
||
const it = e.target.closest('.sitem');
|
||
if (!it) return;
|
||
drop.classList.remove('on'); inp.value = '';
|
||
if (it.dataset.t === 'major') {
|
||
const code = it.dataset.code;
|
||
// 在估分页选专业 → 回填,不跳走
|
||
if ($('#v-score').classList.contains('on')) {
|
||
S.scoreMajor = S.majorMap[code] || null;
|
||
$('#score-major-txt').innerHTML = S.scoreMajor
|
||
? `${esc(S.scoreMajor.name)} <em style="color:var(--ink-4);font-style:normal">${code}</em>`
|
||
: code;
|
||
toast('已选 ' + (S.scoreMajor ? S.scoreMajor.name : code));
|
||
return;
|
||
}
|
||
location.hash = '#/major/' + code;
|
||
} else {
|
||
location.hash = '#/school/' + it.dataset.sid;
|
||
}
|
||
});
|
||
document.addEventListener('click', e => {
|
||
if (!e.target.closest('.hsearch')) drop.classList.remove('on');
|
||
});
|
||
}
|
||
|
||
/* ========== 事件 ========== */
|
||
function bindEvents() {
|
||
// 首页入口 → 带条件跳转
|
||
document.addEventListener('click', e => {
|
||
const en = e.target.closest('.entry');
|
||
if (en && (en.dataset.tag || en.dataset.pv)) {
|
||
e.preventDefault();
|
||
goRank({ tag: en.dataset.tag || '' });
|
||
if (en.dataset.pv) setTimeout(() => toast('用上方「全部地区」下拉筛选省份'), 400);
|
||
}
|
||
const qk = e.target.closest('[data-quick]');
|
||
if (qk) goRank({ tag: qk.dataset.tag || '', lv: qk.dataset.lv || '', pv: qk.dataset.pv || '' });
|
||
const cat = e.target.closest('[data-cat]');
|
||
if (cat) {
|
||
const ml = cat.dataset.cat;
|
||
const first = S.majors.filter(m => m.ml === ml).sort((a, b) => b.n_school - a.n_school)[0];
|
||
if (first) location.hash = '#/major/' + first.code;
|
||
}
|
||
// 榜单行 → 抽屉
|
||
const row = e.target.closest('.rrow[data-code]');
|
||
if (row && !row.getAttribute('href')) {
|
||
openSheet(row.dataset.sid, row.dataset.code, row.dataset.sname || '', row.dataset.xy || '');
|
||
}
|
||
});
|
||
|
||
$('#mask').onclick = closeSheet;
|
||
$('#sheet-x').onclick = closeSheet;
|
||
document.addEventListener('keydown', e => { if (e.key === 'Escape') closeSheet(); });
|
||
|
||
// 排序 / 筛选
|
||
$('#seg-sort').addEventListener('click', e => {
|
||
const b = e.target.closest('button'); if (!b) return;
|
||
S.F.sort = b.dataset.sort;
|
||
$$('#seg-sort button').forEach(x => x.classList.toggle('on', x === b));
|
||
renderRank();
|
||
});
|
||
$('#f-pv').onchange = e => { S.F.pv = e.target.value; renderRank(); };
|
||
$('#f-lv').onchange = e => { S.F.lv = e.target.value; renderRank(); };
|
||
$('#rank-tags').addEventListener('click', e => {
|
||
const c = e.target.closest('.chip'); if (!c) return;
|
||
if (c.dataset.tag === '__all') {
|
||
S.F.all = !S.F.all;
|
||
c.classList.toggle('on', S.F.all);
|
||
} else {
|
||
S.F.tag = c.dataset.tag;
|
||
$$('#rank-tags .chip').forEach(x => { if (x.dataset.tag !== '__all') x.classList.toggle('on', x === c); });
|
||
}
|
||
renderRank();
|
||
});
|
||
|
||
// 院校库筛选
|
||
$('#s-pv').onchange = e => { S.SF.pv = e.target.value; paintSchools(); };
|
||
$('#s-lv').onchange = e => { S.SF.lv = e.target.value; paintSchools(); };
|
||
$('#seg-sch').addEventListener('click', e => {
|
||
const b = e.target.closest('button'); if (!b) return;
|
||
S.SF.sort = b.dataset.ss;
|
||
$$('#seg-sch button').forEach(x => x.classList.toggle('on', x === b));
|
||
paintSchools();
|
||
});
|
||
|
||
// 对比浮条
|
||
$('#cmp-go').onclick = () => { location.hash = '#/compare'; };
|
||
$('#cmp-clr').onclick = () => { S.cmp = []; localStorage.setItem('zx_cmp', '[]'); paintCmpBar(); toast('已清空'); };
|
||
|
||
// 估分
|
||
$('#score-major').onclick = () => jumpSearch();
|
||
$('#score-go').onclick = genScore;
|
||
$('#score-val').addEventListener('keydown', e => { if (e.key === 'Enter') genScore(); });
|
||
}
|
||
|
||
function jumpSearch() {
|
||
const el = $('#q'); el.focus();
|
||
$('#sdrop').classList.remove('on');
|
||
toast('在上方搜索框输入专业名,选中即可');
|
||
el.scrollIntoView({ block: 'center', behavior: 'smooth' });
|
||
}
|
||
|
||
/* ========== 冲稳保 ========== */
|
||
function genScore() {
|
||
const v = parseFloat($('#score-val').value);
|
||
const code = S.scoreMajor && S.scoreMajor.code;
|
||
if (!code) { toast('先选一个目标专业'); return; }
|
||
if (!v || v < 100 || v > 500) { toast('请填一个合理的总分(100-500)'); return; }
|
||
const d = S.cur && S.cur.code === code ? S.cur : null;
|
||
if (!d) { toast('专业数据加载中,稍后再试'); return; }
|
||
|
||
const pool = d.rows.filter(r => r.img !== null);
|
||
if (!pool.length) {
|
||
$('#score-result').innerHTML = '<div class="empty"><b>这个专业暂时没有录取最低分数据</b><p>换个专业,或去「按专业挑学校」看竞争评估</p></div>';
|
||
return;
|
||
}
|
||
const tc = [], tw = [], tb = [], far = [];
|
||
pool.forEach(r => {
|
||
const diff = v - r.img;
|
||
const item = { ...r, diff };
|
||
if (diff >= 20) tb.push(item);
|
||
else if (diff >= 0) tw.push(item);
|
||
else if (diff >= -20) tc.push(item);
|
||
else far.push(item);
|
||
});
|
||
const srt = (a, k) => a.sort((x, y) => (k === 'diff' ? y.diff - x.diff : (x.ic || 0) - (y.ic || 0)));
|
||
|
||
const tier = (cls, title, hint, arr, more) => {
|
||
const show = arr.slice(0, 8);
|
||
return `<div class="tier ${cls}">
|
||
<div class="tier-hd"><i></i><b>${title}</b><span>${arr.length} 所</span></div>
|
||
<div class="tier-bd">
|
||
${show.length ? show.map(r => `
|
||
<div class="titem" data-sid="${r.sid}" data-code="${code}" data-sname="${esc(r.sch)}" data-xy="${esc(r.xy)}">
|
||
<div class="n">${esc(r.sch)}<span class="lv lv-${esc(r.lv)}">${esc(r.lv)}</span></div>
|
||
<div class="m"><span>${esc(r.xy || '')}</span><span>最低分 <b>${r.img}</b></span><span>你${r.diff >= 0 ? '高' : '低'} <b>${Math.abs(r.diff)}</b> 分</span></div>
|
||
</div>`).join('') : '<div style="padding:18px 10px;text-align:center;font-size:12.5px;color:var(--ink-4)">这一档暂时没有匹配的院校</div>'}
|
||
${arr.length > show.length ? `<div class="tier-more">还有 ${arr.length - show.length} 所,去榜单看全部 →</div>` : ''}
|
||
</div>
|
||
</div>`;
|
||
};
|
||
|
||
$('#score-result').innerHTML = `
|
||
<div style="margin-top:22px;display:flex;align-items:center;gap:10px;flex-wrap:wrap">
|
||
<div style="font-size:15px;font-weight:800">${esc(d.name)} · 估分 ${v}</div>
|
||
<span style="font-size:12.5px;color:var(--ink-4)">在 ${pool.length} 个有录取分的硕士点中匹配</span>
|
||
<a href="#/major/${code}" style="margin-left:auto;font-size:12.5px;font-weight:600;color:var(--brand)">看完整榜单 →</a>
|
||
</div>
|
||
<div class="tiers">
|
||
${tier('tc', '冲刺', '最低分比你高 0–20 分', srt(tc, 'diff'))}
|
||
${tier('tw', '稳妥', '最低分刚好够,或你高出 20 分内', srt(tw, 'diff'))}
|
||
${tier('tb', '保底', '你比最低分高 20 分以上', srt(tb, 'diff'))}
|
||
</div>
|
||
<div class="note" style="margin-top:18px">
|
||
<div class="note-h">怎么用这三档</div>
|
||
以<b>去年拟录取最低分</b>为基准做差:高出 20 分以上算保底,0–20 分算稳妥,低 0–20 分算冲刺,低 20 分以上不推荐(共 ${far.length} 所,未展示)。
|
||
注意最低分是个别考生,<b>不代表平均水位</b>;招 5 人和招 50 人的同一分数,风险完全不同。建议冲刺档里优先挑招生人数多的。
|
||
</div>`;
|
||
$$('#score-result .titem').forEach(el => el.onclick = () => openSheet(el.dataset.sid, el.dataset.code, el.dataset.sname, el.dataset.xy));
|
||
}
|
||
|
||
/* ========== 启动 ========== */
|
||
window.addEventListener('hashchange', () => { route(); });
|
||
document.addEventListener('DOMContentLoaded', () => {
|
||
bindEvents(); bindSearch();
|
||
addEventListener('scroll', () => {
|
||
$('.hdr').classList.toggle('solid', scrollY > 8);
|
||
}, { passive: true });
|
||
boot();
|
||
});
|
||
</script>
|
||
</body>
|
||
</html>
|