565 lines
27 KiB
HTML
565 lines
27 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>专业录取分 - 河南高考志愿助手</title>
|
||
<meta name="description" content="按学校查专业,或按专业查学校,查看分专业录取数据">
|
||
<style>
|
||
*{margin:0;padding:0;box-sizing:border-box}
|
||
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:#0a0a0f;color:#e0e0e0;min-height:100vh;line-height:1.7}
|
||
.header{background:rgba(20,20,30,0.95);backdrop-filter:blur(20px);border-bottom:1px solid rgba(255,255,255,0.08);padding:14px 0;position:sticky;top:0;z-index:100}
|
||
.header-inner{max-width:1200px;margin:0 auto;padding:0 20px;overflow-x:auto;-webkit-overflow-scrolling:touch;display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:12px}
|
||
.logo{font-size:1.3rem;font-weight:700;color:#fff;text-decoration:none;flex-shrink:0}
|
||
.logo span{color:#667eea}
|
||
.nav-links{display:flex;gap:20px;list-style:none;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;padding-bottom:4px;min-width:0;max-width:100%}
|
||
.nav-links a{color:#a0a0a0;text-decoration:none;font-size:0.9rem;transition:color 0.3s;flex-shrink:0}
|
||
.nav-links a:hover{color:#667eea}.nav-links a.highlight{color:#667eea;font-weight:600}
|
||
.page-hero{background:linear-gradient(135deg,#0f0f1a,#12102a);padding:40px 0 36px;border-bottom:1px solid rgba(102,126,234,0.15)}
|
||
.container{max-width:1200px;margin:0 auto;padding:0 20px}
|
||
.page-hero h1{font-size:1.7rem;color:#fff;margin-bottom:6px}
|
||
.page-hero p{color:#888;font-size:0.9rem}
|
||
.context-hint{margin-top:14px;font-size:0.85rem;color:#667eea;background:rgba(102,126,234,0.08);padding:10px 16px;border-radius:8px;display:inline-block;line-height:1.5}
|
||
.context-hint a{color:#a5b4fc;text-decoration:none}
|
||
.context-hint a:hover{text-decoration:underline}
|
||
|
||
/* 搜索模式切换 */
|
||
.mode-tabs{display:flex;gap:6px;margin:28px 0 16px;flex-wrap:wrap}
|
||
.mode-tab{padding:8px 20px;border-radius:8px;font-size:0.88rem;font-weight:600;cursor:pointer;border:none;background:rgba(255,255,255,0.06);color:#888;transition:all 0.2s}
|
||
.mode-tab.active{background:rgba(102,126,234,0.2);color:#a5b4fc;border:1px solid rgba(102,126,234,0.4)}
|
||
.mode-tab:hover:not(.active){background:rgba(255,255,255,0.1);color:#ccc}
|
||
|
||
/* 搜索框 */
|
||
.search-bar{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap;align-items:center}
|
||
.search-bar input{flex:1;min-width:200px;padding:11px 16px;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);border-radius:10px;color:#e0e0e0;font-size:0.95rem;outline:none}
|
||
.search-bar input:focus{border-color:#667eea}
|
||
.search-bar input::placeholder{color:#666}
|
||
.search-bar select{padding:11px 14px;background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.18);border-radius:10px;color:#e0e0e0;font-size:0.88rem;outline:none;appearance:auto;-webkit-appearance:auto}
|
||
.search-bar button{padding:11px 24px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:10px;font-size:0.9rem;font-weight:600;cursor:pointer;transition:opacity 0.2s}
|
||
.search-bar button:hover{opacity:0.88}
|
||
.search-hint{font-size:0.8rem;color:#555;margin-bottom:16px}
|
||
.search-hint span{color:#667eea}
|
||
|
||
/* 结果表格 */
|
||
.results-table{width:100%;border-collapse:collapse;margin-top:8px}
|
||
.results-table th{text-align:left;padding:9px 12px;background:rgba(102,126,234,0.1);color:#667eea;font-size:0.78rem;font-weight:600;border-bottom:1px solid rgba(255,255,255,0.06);white-space:nowrap}
|
||
.results-table td{padding:9px 12px;border-bottom:1px solid rgba(255,255,255,0.04);font-size:0.85rem;color:#aaa;white-space:nowrap}
|
||
.results-table tr:hover td{background:rgba(255,255,255,0.02)}
|
||
.results-table .school-cell{color:#e0e0e0;font-weight:600;max-width:160px;overflow:hidden;text-overflow:ellipsis}
|
||
.results-table .major-cell{color:#ccc;max-width:180px;overflow:hidden;text-overflow:ellipsis}
|
||
.results-table .score-cell{color:#4ade80;font-weight:700;font-size:0.95rem}
|
||
.results-table .rank-cell{color:#fbbf24}
|
||
.results-table .tag{margin-right:4px}
|
||
.results-table .tag-985{color:#f97316;font-size:0.72rem;font-weight:600}
|
||
.results-table .tag-211{color:#38bdf8;font-size:0.72rem;font-weight:600}
|
||
.results-table .group-tag{color:#a78bfa;font-size:0.75rem;background:rgba(167,139,250,0.1);padding:1px 6px;border-radius:4px;margin-left:4px}
|
||
.results-table .batch-tag{color:#888;font-size:0.72rem;background:rgba(255,255,255,0.05);padding:1px 6px;border-radius:4px}
|
||
.results-table .req-cell{color:#666;font-size:0.75rem;max-width:140px;overflow:hidden;text-overflow:ellipsis}
|
||
|
||
/* 统计栏 */
|
||
.stats-bar{display:flex;gap:20px;margin:16px 0;flex-wrap:wrap}
|
||
.stat-item{background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.07);border-radius:10px;padding:12px 18px;min-width:120px}
|
||
.stat-item .stat-label{color:#666;font-size:0.75rem;margin-bottom:4px}
|
||
.stat-item .stat-value{color:#667eea;font-size:1.1rem;font-weight:700}
|
||
|
||
/* 分页 */
|
||
.pagination{margin-top:28px;overflow-x:auto;-webkit-overflow-scrolling:touch;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
|
||
.pagination button{display:inline-flex;align-items:center;gap:5px;padding:8px 16px;border-radius:8px;font-size:0.85rem;font-weight:600;cursor:pointer;border:none;transition:all 0.2s;background:rgba(255,255,255,0.06);color:#aaa}
|
||
.pagination button:hover:not(:disabled){background:rgba(102,126,234,0.15);color:#667eea}
|
||
.pagination button:disabled{opacity:0.35;cursor:not-allowed}
|
||
.pagination .page-info{color:#555;font-size:0.82rem}
|
||
.pagination .page-info span{color:#667eea;font-weight:600}
|
||
|
||
/* 状态 */
|
||
.loading{text-align:center;padding:50px 0;color:#666;font-size:0.9rem}
|
||
.no-data{text-align:center;padding:50px 0;color:#666;font-size:0.9rem}
|
||
.tips{background:rgba(102,126,234,0.06);border:1px solid rgba(102,126,234,0.15);border-radius:10px;padding:14px 18px;margin:16px 0;color:#888;font-size:0.83rem}
|
||
.tips::before{content:"💡 ";color:#667eea}
|
||
|
||
/* 移动端 */
|
||
@media(max-width:700px){
|
||
.page-hero h1{font-size:1.3rem}
|
||
.results-table{font-size:0.78rem}
|
||
.results-table th,.results-table td{padding:7px 8px}
|
||
}
|
||
/* 页脚 */
|
||
.footer {
|
||
background: rgba(255,255,255,0.03);
|
||
border-top: 1px solid rgba(255,255,255,0.06);
|
||
padding: 40px 0 30px;
|
||
margin-top: 40px;
|
||
}
|
||
.footer .container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
|
||
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: flex-start; margin-bottom: 30px; }
|
||
.footer-logo { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
|
||
.footer-logo span { color: #667eea; }
|
||
.footer-desc { color: #555; font-size: 0.82rem; line-height: 1.7; max-width: 400px; }
|
||
.footer-contact-title { color: #888; font-size: 0.82rem; margin-bottom: 10px; text-align: right; }
|
||
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; text-align: center; color: #444; font-size: 0.78rem; }
|
||
@media(max-width: 600px) {
|
||
.footer-inner { grid-template-columns: 1fr; gap: 24px; }
|
||
.footer-contact-title { text-align: left; }
|
||
}
|
||
.nav-links a.highlight::after { content: ""; display: block; width: 100%; height: 2px; background: linear-gradient(90deg, #667eea, #764ba2); border-radius: 2px; margin-top: 3px; animation: shimmer 2s linear infinite; background-size: 200% 100%; }
|
||
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
|
||
@media (max-width: 768px) {
|
||
.header { padding: 10px 0; }
|
||
.nav-links { gap: 14px; }
|
||
.nav-links a { font-size: 0.82rem; }
|
||
}
|
||
|
||
/* ═══════════ 酷炫升级 ═══════════ */
|
||
@keyframes gradientShift {
|
||
0% { background-position: 0% 50%; }
|
||
50% { background-position: 100% 50%; }
|
||
100% { background-position: 0% 50%; }
|
||
}
|
||
@keyframes glowPulse {
|
||
0%, 100% { box-shadow: 0 0 15px rgba(102,126,234,0.1); }
|
||
50% { box-shadow: 0 0 30px rgba(102,126,234,0.25); }
|
||
}
|
||
.fade-in {
|
||
opacity: 0;
|
||
transform: translateY(30px);
|
||
transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||
}
|
||
.fade-in.visible {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
.fade-in-delay-1 { transition-delay: 0.1s; }
|
||
.fade-in-delay-2 { transition-delay: 0.2s; }
|
||
.fade-in-delay-3 { transition-delay: 0.3s; }
|
||
.fade-in-delay-4 { transition-delay: 0.4s; }
|
||
button, a.btn-like, .btn, [class*="btn"] {
|
||
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
|
||
}
|
||
button:hover, a.btn-like:hover, [class*="btn"]:hover {
|
||
transform: translateY(-2px) scale(1.02) !important;
|
||
box-shadow: 0 8px 30px rgba(102,126,234,0.35) !important;
|
||
}
|
||
button:active, [class*="btn"]:active {
|
||
transform: scale(0.96) !important;
|
||
}
|
||
|
||
/* ═══════════ 赛博升级 2.0 ═══════════ */
|
||
@property --angle {
|
||
syntax: '<angle>';
|
||
initial-value: 0deg;
|
||
inherits: false;
|
||
}
|
||
@keyframes rotateBorder {
|
||
to { --angle: 360deg; }
|
||
}
|
||
@keyframes floatParticle {
|
||
0% { transform: translateY(0) translateX(0); opacity: 0; }
|
||
10% { opacity: 0.4; }
|
||
90% { opacity: 0.4; }
|
||
100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
|
||
}
|
||
|
||
/* 科技网格背景 */
|
||
body {
|
||
background-image:
|
||
linear-gradient(rgba(102,126,234,0.03) 1px, transparent 1px),
|
||
linear-gradient(90deg, rgba(102,126,234,0.03) 1px, transparent 1px);
|
||
background-size: 60px 60px;
|
||
}
|
||
|
||
/* 渐变旋转边框卡片 */
|
||
[class*="card"], [class*="item"], [class*="result"], table, .msg, .message {
|
||
position: relative;
|
||
background-clip: padding-box;
|
||
border: 1px solid transparent !important;
|
||
background-origin: border-box;
|
||
}
|
||
</style>
|
||
<link rel="stylesheet" href="/style.css">
|
||
</head>
|
||
<body>
|
||
<header class="header">
|
||
<div class="header-inner">
|
||
<a href="/" class="logo">高考志愿<span>助手</span></a>
|
||
<ul class="nav-links">
|
||
<li><a href="/" style="font-weight:600">🏠 首页</a></li>
|
||
<li><a href="/school.html">④🏫 院校详情</a></li>
|
||
<li><a href="/major.html" class="highlight">④📊 专业录取分</a></li>
|
||
<li><a href="/chat">②🤖 AI对话</a></li>
|
||
<li><a href="/plan.html">③📝 志愿草表</a></li>
|
||
<li><a href="/qa.html">❓ 常见问题</a></li>
|
||
<li><a href="/disclaimer.html" style="font-size:0.8rem">⚖️ 免责</a></li>
|
||
<li><a href="/privacy.html" style="font-size:0.8rem">🔒 隐私</a></li>
|
||
</ul>
|
||
</div>
|
||
</header>
|
||
|
||
<div class="page-hero"><div class="container">
|
||
<h1>📊 专业录取分</h1>
|
||
<p>按学校查专业,或按专业查学校,查看各专业 2022-2025 历年录取分数和位次</p>
|
||
<div class="context-hint">🏫 <strong>第四步:深入了解</strong> — 查看专业的历年录取数据。也可以回到 <a href="/chat">②🤖 AI对话</a> 继续咨询 →</div>
|
||
</div></div>
|
||
|
||
<div class="container">
|
||
<!-- 搜索模式切换 -->
|
||
<div class="mode-tabs">
|
||
<button class="mode-tab active" onclick="setMode('school')" id="tabSchool">🏫 按学校查专业</button>
|
||
<button class="mode-tab" onclick="setMode('major')" id="tabMajor">📚 按专业查学校</button>
|
||
</div>
|
||
|
||
<!-- 搜索框 -->
|
||
<div class="search-bar">
|
||
<select id="subjectSel">
|
||
<option value="">全部科类</option>
|
||
<option value="物理类">物理类</option>
|
||
<option value="历史类">历史类</option>
|
||
</select>
|
||
<select id="yearSel">
|
||
<option value="2025">2025年</option>
|
||
<option value="2024">2024年</option>
|
||
<option value="2023">2023年</option>
|
||
<option value="2022">2022年</option>
|
||
</select>
|
||
<input type="text" id="keywordInput" placeholder="输入学校名称,如:郑州大学" onkeydown="if(event.key==='Enter')searchMajor()">
|
||
<button onclick="searchMajor()">搜索</button>
|
||
</div>
|
||
<div class="search-hint" id="searchHint">
|
||
输入 <span>学校名称</span> → 查看该校在河南招收的所有专业及录取分
|
||
</div>
|
||
|
||
<!-- 统计栏 -->
|
||
<div class="stats-bar" id="statsBar" style="display:none">
|
||
<div class="stat-item">
|
||
<div class="stat-label">查询结果</div>
|
||
<div class="stat-value" id="statCount">-</div>
|
||
</div>
|
||
<div class="stat-item">
|
||
<div class="stat-label">最高分</div>
|
||
<div class="stat-value" id="statMax">-</div>
|
||
</div>
|
||
<div class="stat-item">
|
||
<div class="stat-label">最低分</div>
|
||
<div class="stat-value" id="statMin">-</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 加载中 -->
|
||
<div class="loading" id="loadingArea" style="display:none">搜索中...</div>
|
||
|
||
<!-- 无数据 -->
|
||
<div class="no-data" id="noData" style="display:none">未找到相关数据,请尝试其他关键词</div>
|
||
|
||
<!-- 结果表格 -->
|
||
<div id="resultsArea" style="display:none;overflow-x:auto">
|
||
<table class="results-table">
|
||
<thead>
|
||
<tr>
|
||
<th>学校</th>
|
||
<th>专业</th>
|
||
<th>专业组</th>
|
||
<th>选科要求</th>
|
||
<th>计划数</th>
|
||
<th>最低分</th>
|
||
<th>最低位次</th>
|
||
<th>批次</th>
|
||
<th>科类</th>
|
||
<th>年份</th>
|
||
<th>属性</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="resultsBody"></tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<!-- 分页 -->
|
||
<div class="pagination" id="pagination" style="display:none">
|
||
<button id="prevBtn" onclick="changePage(-1)">← 上一页</button>
|
||
<span class="page-info" id="pageInfo">第 <span>1</span> / <span>1</span> 页</span>
|
||
<button id="nextBtn" onclick="changePage(1)">下一页 →</button>
|
||
</div>
|
||
|
||
<div class="tips">
|
||
数据来源河南省教育考试院历年招生计划。专业组代码(如(101)(102))代表不同分专业组投档线,请结合招生章程和选科要求综合判断。
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<script>
|
||
var searchMode = 'school'; // 'school' | 'major'
|
||
var currentPage = 1;
|
||
var pageSize = 30;
|
||
var totalItems = 0;
|
||
var currentData = [];
|
||
var actualYear = 2025; // 实际数据年份(可能回退)
|
||
|
||
function setMode(mode) {
|
||
searchMode = mode;
|
||
document.getElementById('tabSchool').classList.toggle('active', mode === 'school');
|
||
document.getElementById('tabMajor').classList.toggle('active', mode === 'major');
|
||
var input = document.getElementById('keywordInput');
|
||
var hint = document.getElementById('searchHint');
|
||
if (mode === 'school') {
|
||
input.placeholder = '输入学校名称,如:郑州大学';
|
||
hint.innerHTML = '输入 <span>学校名称</span> → 查看该校在河南招收的所有专业及录取分';
|
||
} else {
|
||
input.placeholder = '输入专业名称,如:计算机科学与技术';
|
||
hint.innerHTML = '输入 <span>专业名称</span> → 查看哪些学校在河南招收该专业及录取分';
|
||
}
|
||
currentPage = 1;
|
||
}
|
||
|
||
function getParams() {
|
||
var kw = document.getElementById('keywordInput').value.trim();
|
||
var subject = document.getElementById('subjectSel').value;
|
||
var year = document.getElementById('yearSel').value;
|
||
var params = { limit: 200 };
|
||
if (kw) {
|
||
if (searchMode === 'school') params.school = kw;
|
||
else params.major = kw;
|
||
}
|
||
if (subject) params.subject = subject;
|
||
if (year) params.year = year;
|
||
return params;
|
||
}
|
||
|
||
function searchMajor() {
|
||
var kw = document.getElementById('keywordInput').value.trim();
|
||
if (!kw) {
|
||
showToast(searchMode==="school"?"请输入学校名称":"请输入专业名称","warn");
|
||
return;
|
||
}
|
||
currentPage = 1;
|
||
doSearch(kw);
|
||
}
|
||
|
||
function doSearch(kw) {
|
||
var params = getParams();
|
||
var query = Object.keys(params).map(function(k){ return k + '=' + encodeURIComponent(params[k]); }).join('&');
|
||
showLoading(true);
|
||
fetch('/api/major/search?' + query)
|
||
.then(function(r){ return r.json(); })
|
||
.then(function(data){
|
||
showLoading(false);
|
||
currentData = data.majors || [];
|
||
actualYear = data.actual_year || parseInt(document.getElementById('yearSel').value) || 2025;
|
||
totalItems = currentData.length;
|
||
renderStats();
|
||
renderResults();
|
||
})
|
||
.catch(function(){
|
||
showLoading(false);
|
||
document.getElementById('noData').style.display = 'block';
|
||
document.getElementById('resultsArea').style.display = 'none';
|
||
});
|
||
}
|
||
|
||
function showLoading(show) {
|
||
document.getElementById('loadingArea').style.display = show ? 'block' : 'none';
|
||
document.getElementById('noData').style.display = 'none';
|
||
document.getElementById('resultsArea').style.display = 'none';
|
||
document.getElementById('statsBar').style.display = 'none';
|
||
document.getElementById('pagination').style.display = 'none';
|
||
}
|
||
|
||
function renderStats() {
|
||
document.getElementById('statsBar').style.display = 'flex';
|
||
document.getElementById('statCount').textContent = totalItems;
|
||
var hintEl = document.getElementById('yearHint');
|
||
var selYear = parseInt(document.getElementById('yearSel').value);
|
||
if (actualYear !== selYear) {
|
||
if (!hintEl) {
|
||
hintEl = document.createElement('div');
|
||
hintEl.id = 'yearHint';
|
||
hintEl.style.cssText = 'background:rgba(251,191,36,0.1);border:1px solid rgba(251,191,36,0.25);border-radius:8px;padding:8px 14px;margin:8px 0;font-size:0.82rem;color:#fbbf24';
|
||
document.getElementById('statsBar').after(hintEl);
|
||
}
|
||
hintEl.textContent = '⚠️ ' + selYear + '年暂无数据,已自动切换到 ' + actualYear + ' 年数据';
|
||
hintEl.style.display = 'block';
|
||
} else if (hintEl) {
|
||
hintEl.style.display = 'none';
|
||
}
|
||
if (currentData.length > 0) {
|
||
var scores = currentData.filter(function(d){ return d.score > 0; }).map(function(d){ return d.score; });
|
||
if (scores.length > 0) {
|
||
document.getElementById('statMax').textContent = Math.max.apply(null, scores);
|
||
document.getElementById('statMin').textContent = Math.min.apply(null, scores);
|
||
}
|
||
}
|
||
}
|
||
|
||
function renderResults() {
|
||
if (currentData.length === 0) {
|
||
document.getElementById('noData').style.display = 'block';
|
||
document.getElementById('resultsArea').style.display = 'none';
|
||
document.getElementById('pagination').style.display = 'none';
|
||
return;
|
||
}
|
||
document.getElementById('noData').style.display = 'none';
|
||
document.getElementById('resultsArea').style.display = 'block';
|
||
|
||
var start = (currentPage - 1) * pageSize;
|
||
var page = currentData.slice(start, start + pageSize);
|
||
|
||
var tbody = document.getElementById('resultsBody');
|
||
tbody.innerHTML = page.map(function(d){
|
||
var tags = '';
|
||
if (d.is_985) tags += '<span class="tag-985">985</span>';
|
||
if (d.is_211) tags += '<span class="tag-211">211</span>';
|
||
if (!tags) tags = '-';
|
||
return '<tr>' +
|
||
'<td class="school-cell" title="'+escHtml(d.school)+'">'+escHtml(d.school)+'</td>' +
|
||
'<td class="major-cell" title="'+escHtml(d.major)+'">'+escHtml(d.major)+(d.major_code ? ' <span style="color:#555;font-size:0.72rem">'+escHtml(d.major_code)+'</span>' : '')+'</td>' +
|
||
'<td>'+(d.group ? '<span class="group-tag">'+escHtml(d.group)+'</span>' : '-')+'</td>' +
|
||
'<td class="req-cell" title="'+escHtml(d.req)+'">'+escHtml(d.req||'-')+'</td>' +
|
||
'<td>'+(d.plan > 0 ? d.plan : '-')+'</td>' +
|
||
'<td class="score-cell">'+d.score+'</td>' +
|
||
'<td class="rank-cell">'+(d.rank > 0 ? d.rank : '-')+'</td>' +
|
||
'<td><span class="batch-tag">'+escHtml(d.batch||'')+'</span></td>' +
|
||
'<td>'+escHtml(d.subject||'')+'</td>' +
|
||
'<td>'+(d.year||'')+'</td>' +
|
||
'<td>'+tags+'</td>' +
|
||
'</tr>';
|
||
}).join('');
|
||
|
||
var totalPages = Math.max(1, Math.ceil(totalItems / pageSize));
|
||
document.getElementById('pageInfo').innerHTML = '第 <span>'+currentPage+'</span> / <span>'+totalPages+'</span> 页';
|
||
document.getElementById('prevBtn').disabled = currentPage <= 1;
|
||
document.getElementById('nextBtn').disabled = currentPage >= totalPages;
|
||
document.getElementById('pagination').style.display = totalItems > pageSize ? 'flex' : 'none';
|
||
}
|
||
|
||
function changePage(delta) {
|
||
var totalPages = Math.max(1, Math.ceil(totalItems / pageSize));
|
||
var next = currentPage + delta;
|
||
if (next < 1 || next > totalPages) return;
|
||
currentPage = next;
|
||
renderResults();
|
||
window.scrollTo({top: 0, behavior: 'smooth'});
|
||
}
|
||
|
||
function escHtml(s) {
|
||
if (!s) return '';
|
||
return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
|
||
}
|
||
|
||
// 历史记录
|
||
var historyKey = 'gaokao_major_history';
|
||
function saveHistory(kw) {
|
||
if (!kw) return;
|
||
var h = JSON.parse(localStorage.getItem(historyKey) || '[]');
|
||
h = h.filter(function(v){ return v !== kw; });
|
||
h.unshift(kw);
|
||
h = h.slice(0, 10);
|
||
localStorage.setItem(historyKey, JSON.stringify(h));
|
||
}
|
||
|
||
function loadHistory() {
|
||
var h = JSON.parse(localStorage.getItem(historyKey) || '[]');
|
||
if (h.length > 0) {
|
||
var dl = document.createElement('datalist');
|
||
dl.id = 'kwHistory';
|
||
h.forEach(function(v){ dl.innerHTML += '<option value="'+escHtml(v)+'">'; });
|
||
document.getElementById('keywordInput').setAttribute('list', 'kwHistory');
|
||
document.body.appendChild(dl);
|
||
}
|
||
}
|
||
loadHistory();
|
||
|
||
// 粒子系统
|
||
(function(){
|
||
const body = document.body;
|
||
const pc = document.createElement('div');
|
||
pc.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;overflow:hidden;pointer-events:none;z-index:-1;';
|
||
for (let i = 0; i < 20; i++) {
|
||
const p = document.createElement('div');
|
||
p.style.cssText = 'position:absolute;border-radius:50%;';
|
||
p.style.left = (Math.random() * 100) + '%';
|
||
p.style.width = (1 + Math.random() * 2) + 'px';
|
||
p.style.height = p.style.width;
|
||
p.style.background = Math.random() > 0.5 ? 'rgba(102,126,234,0.4)' : 'rgba(165,180,252,0.3)';
|
||
p.style.animation = 'floatParticle ' + (6 + Math.random() * 12) + 's ' + (Math.random() * 8) + 's linear infinite';
|
||
pc.appendChild(p);
|
||
}
|
||
body.appendChild(pc);
|
||
})();
|
||
</script>
|
||
|
||
<div class="footer">
|
||
<div class="container">
|
||
<div class="footer-inner">
|
||
<div class="footer-left">
|
||
<p class="footer-logo">高考志愿<span>助手</span></p>
|
||
<p class="footer-desc">2026 河南高考志愿填报辅助工具<br>数据来源:河南省教育考试院,仅供辅助参考,不作为正式依据</p>
|
||
</div>
|
||
<div class="footer-right">
|
||
<p class="footer-contact-title">遇到问题?</p>
|
||
<p style="color:#555;font-size:0.8rem">联系邮箱:shangdiyefeng@vip.qq.com</p>
|
||
</div>
|
||
</div>
|
||
<div class="footer-bottom">
|
||
<span>⚖️ 本站数据仅供参考,不作为正式录取依据</span> ·
|
||
<a href="/privacy.html" style="color:#667eea;text-decoration:none;margin-right:8px">🔒 隐私政策</a>
|
||
<a href="/disclaimer.html" style="color:#667eea;text-decoration:none;margin-right:8px">⚠️ 免责声明</a> ·
|
||
<a href="/support.html" style="color:#667eea;text-decoration:none;margin-right:8px">☕ 支持运营</a> ·
|
||
© 2026 河南高考志愿助手
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>function showToast(m,t){var d=document.createElement("div");d.className="toast"+(t?" "+t:"");d.textContent=m;d.style.pointerEvents="none";document.body.appendChild(d);setTimeout(function(){d.remove()},3000)}
|
||
// 粒子系统
|
||
(function(){
|
||
const body = document.body;
|
||
const pc = document.createElement('div');
|
||
pc.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;overflow:hidden;pointer-events:none;z-index:-1;';
|
||
for (let i = 0; i < 20; i++) {
|
||
const p = document.createElement('div');
|
||
p.style.cssText = 'position:absolute;border-radius:50%;';
|
||
p.style.left = (Math.random() * 100) + '%';
|
||
p.style.width = (1 + Math.random() * 2) + 'px';
|
||
p.style.height = p.style.width;
|
||
p.style.background = Math.random() > 0.5 ? 'rgba(102,126,234,0.4)' : 'rgba(165,180,252,0.3)';
|
||
p.style.animation = 'floatParticle ' + (6 + Math.random() * 12) + 's ' + (Math.random() * 8) + 's linear infinite';
|
||
pc.appendChild(p);
|
||
}
|
||
body.appendChild(pc);
|
||
})();
|
||
</script>
|
||
|
||
<script>
|
||
const observer = new IntersectionObserver((entries) => {
|
||
entries.forEach(entry => {
|
||
if (entry.isIntersecting) {
|
||
entry.target.classList.add('visible');
|
||
observer.unobserve(entry.target);
|
||
}
|
||
});
|
||
}, { threshold: 0.1, rootMargin: '0px 0px -50px 0px' });
|
||
document.addEventListener('DOMContentLoaded', () => {
|
||
document.querySelectorAll('section, .section, .card, [class*="card"], .result, .item, .row').forEach((el, i) => {
|
||
el.classList.add('fade-in');
|
||
el.classList.add('fade-in-delay-' + (i % 4 + 1));
|
||
observer.observe(el);
|
||
});
|
||
});
|
||
|
||
// 粒子系统
|
||
(function(){
|
||
const body = document.body;
|
||
const pc = document.createElement('div');
|
||
pc.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;overflow:hidden;pointer-events:none;z-index:-1;';
|
||
for (let i = 0; i < 20; i++) {
|
||
const p = document.createElement('div');
|
||
p.style.cssText = 'position:absolute;border-radius:50%;';
|
||
p.style.left = (Math.random() * 100) + '%';
|
||
p.style.width = (1 + Math.random() * 2) + 'px';
|
||
p.style.height = p.style.width;
|
||
p.style.background = Math.random() > 0.5 ? 'rgba(102,126,234,0.4)' : 'rgba(165,180,252,0.3)';
|
||
p.style.animation = 'floatParticle ' + (6 + Math.random() * 12) + 's ' + (Math.random() * 8) + 's linear infinite';
|
||
pc.appendChild(p);
|
||
}
|
||
body.appendChild(pc);
|
||
})();
|
||
</script>
|
||
</body>
|
||
</html> |