追标
🏛️ 权威国家与行业层级目录

全部标准

权威收录全部标准共计 854,652 项标准。涵盖现行有效、即将实施、已被代替全生命周期演变,提供官方在线预览、实施日期倒计时与替代演变图谱。

标准条目全量清单 854,652 项
支持按时效、代际替代穿透
序号 标准编号 标准名称 状态 详情
21 Q/JODZ 0001S-2026 ↗
企业标准 · 食品轻工与现代农业
复水笋干软罐头
归口:南平市卫生健康委
✅ 现行有效 查新详情 →
22 Q/PXFL 0001S-2026 ↗
企业标准 · 食品轻工与现代农业
香辛料调味品
归口:莆田市卫生健康委
✅ 现行有效 查新详情 →
23 Q/PXFL 0003S-2026 ↗
企业标准 · 食品轻工与现代农业
油炸粉
归口:莆田市卫生健康委
✅ 现行有效 查新详情 →
24 Q/PPHH 0001S-2026 ↗
企业标准 · 食品轻工与现代农业
冷冻调理水产制品
归口:莆田市卫生健康委
✅ 现行有效 查新详情 →
25 Q/FJSY 0031S-2026 ↗
企业标准 · 食品轻工与现代农业
冻干银耳羹
归口:宁德市卫生健康委
✅ 现行有效 查新详情 →
26 Q/FJJT 0001S-2026 ↗
企业标准 · 食品轻工与现代农业
复合调味料
归口:龙岩市卫生健康委
✅ 现行有效 查新详情 →
27 Q/GTDG 0021S-2026 ↗
企业标准 · 食品轻工与现代农业
桂圆干制品
归口:宁德市卫生健康委
✅ 现行有效 查新详情 →
28 Q/GTDG 0022S-2026 ↗
企业标准 · 食品轻工与现代农业
枸杞
归口:宁德市卫生健康委
✅ 现行有效 查新详情 →
29 Q/GTDG 0023S-2026 ↗
企业标准 · 食品轻工与现代农业
干制红枣
归口:宁德市卫生健康委
✅ 现行有效 查新详情 →
30 Q/FJHY 0026S-2026 ↗
企业标准 · 食品轻工与现代农业
水果制品
归口:宁德市卫生健康委
✅ 现行有效 查新详情 →
31 Q/GSSP 0004S-2026 ↗
企业标准 · 食品轻工与现代农业
食用淀粉
归口:宁德市卫生健康委
✅ 现行有效 查新详情 →
32 Q/YMS 0014S-2026 ↗
企业标准 · 食品轻工与现代农业
方便粥
归口:厦门市卫生健康委
✅ 现行有效 查新详情 →
33 Q/YMS 0015S-2026 ↗
企业标准 · 食品轻工与现代农业
方便湿米粉
归口:厦门市卫生健康委
✅ 现行有效 查新详情 →
34 Q/YMS 0016S-2026 ↗
企业标准 · 食品轻工与现代农业
方便湿面
归口:厦门市卫生健康委
✅ 现行有效 查新详情 →
35 Q/QZMR 0002S-2026 ↗
企业标准 · 食品轻工与现代农业
红糖
归口:泉州市卫生健康委
✅ 现行有效 查新详情 →
36 Q/QZMR 0003S-2026 ↗
企业标准 · 食品轻工与现代农业
调制(调味)红糖
归口:泉州市卫生健康委
✅ 现行有效 查新详情 →
37 Q/JJHL 0002S-2026 ↗
企业标准 · 食品轻工与现代农业
干坛紫菜
归口:泉州市卫生健康委
✅ 现行有效 查新详情 →
38 Q/PXFL 0002S-2026 ↗
企业标准 · 食品轻工与现代农业
固体复合调味料
归口:莆田市卫生健康委
✅ 现行有效 查新详情 →
39 Q/PXFL 0004S-2026 ↗
企业标准 · 食品轻工与现代农业
食用地瓜粉
归口:莆田市卫生健康委
✅ 现行有效 查新详情 →
40 Q/PXFL 0005S-2026 ↗
企业标准 · 食品轻工与现代农业
复合食用淀粉
归口:莆田市卫生健康委
✅ 现行有效 查新详情 →
第 2 页 / 共 42733 页 (全库收录共 854,652 项标准)
let isRegisterMode = false; function openLoginModal(mode = "login") { switchLoginTab(mode === "register" ? "register" : "login"); const m = document.getElementById("loginModal"); if (m) { m.classList.remove("hidden"); m.classList.add("flex"); } } window.openLoginModal = openLoginModal; function closeLoginModal() { const m = document.getElementById("loginModal"); if (m) { m.classList.add("hidden"); m.classList.remove("flex"); } } window.closeLoginModal = closeLoginModal; function switchLoginTab(tab) { const panelPwd = document.getElementById("loginPanelPassword"); const panelThird = document.getElementById("loginPanelThird"); const tabLogin = document.getElementById("tabAuthLogin"); const tabRegister = document.getElementById("tabAuthRegister"); const tabThird = document.getElementById("tabAuthThird"); const extraFields = document.getElementById("registerExtraFields"); const submitBtn = document.getElementById("loginSubmitBtn"); const formHint = document.getElementById("authFormHint"); const toggleBtn = document.getElementById("toggleRegisterBtn"); const uInput = document.getElementById("loginUsername"); const pInput = document.getElementById("loginPassword"); const uLabel = document.getElementById("loginUsernameLabel"); const pLabel = document.getElementById("loginPasswordLabel"); const activeClasses = ["bg-white", "dark:bg-slate-700", "text-blue-600", "dark:text-blue-400", "shadow-xs"]; const inactiveClasses = ["text-slate-600", "dark:text-slate-300"]; [tabLogin, tabRegister, tabThird].forEach(btn => { if (btn) { btn.classList.remove(...activeClasses); btn.classList.add(...inactiveClasses); } }); if (tab === "register") { isRegisterMode = true; panelPwd?.classList.remove("hidden"); panelThird?.classList.add("hidden"); extraFields?.classList.remove("hidden"); if (tabRegister) { tabRegister.classList.add(...activeClasses); tabRegister.classList.remove(...inactiveClasses); } if (submitBtn) submitBtn.textContent = "立即注册账号并发送激活邮件"; if (formHint) formHint.innerHTML = "🛡️ 已开启邮箱安全验证:激活邮件将自动发送至您的注册邮箱,验证后即可使用!"; if (toggleBtn) toggleBtn.textContent = "已有账号?点击切换到【直接登录】"; if (uLabel) uLabel.innerHTML = "注册电子邮箱 (作为登录账号)"; if (uInput) { uInput.type = "email"; uInput.placeholder = "请输入您的有效常用邮箱 (如 [email protected])"; } if (pLabel) pLabel.textContent = "设置登录密码"; if (pInput) pInput.placeholder = "建议6位以上包含字母与数字"; } else if (tab === "third") { isRegisterMode = false; panelPwd?.classList.add("hidden"); panelThird?.classList.remove("hidden"); if (tabThird) { tabThird.classList.add(...activeClasses); tabThird.classList.remove(...inactiveClasses); } if (formHint) formHint.textContent = "第三方快捷授权接入,即刻秒开直连"; } else { // "login" isRegisterMode = false; panelPwd?.classList.remove("hidden"); panelThird?.classList.add("hidden"); extraFields?.classList.add("hidden"); if (tabLogin) { tabLogin.classList.add(...activeClasses); tabLogin.classList.remove(...inactiveClasses); } if (submitBtn) submitBtn.textContent = "立即安全登录"; if (formHint) formHint.textContent = "登录账号以同步查新数据、收藏与享有会员权益"; if (uLabel) uLabel.textContent = "登录账号 / 邮箱 / 手机号"; if (uInput) { uInput.type = "text"; uInput.placeholder = "请输入您的账号 / 邮箱 / 手机号"; } if (pLabel) pLabel.textContent = "登录密码"; if (pInput) pInput.placeholder = "••••••••"; if (toggleBtn) toggleBtn.textContent = "没有账号?立即免费注册"; } } window.switchLoginTab = switchLoginTab; function toggleRegisterMode() { if (isRegisterMode) { switchLoginTab("login"); } else { switchLoginTab("register"); } } window.toggleRegisterMode = toggleRegisterMode; function switchAuthMode(mode) { switchLoginTab(mode); } window.switchAuthMode = switchAuthMode; async function handlePasswordLoginSubmit(event) { if (event) event.preventDefault(); const username = document.getElementById("loginUsername")?.value.trim(); const password = document.getElementById("loginPassword")?.value.trim(); const displayName = document.getElementById("registerDisplayName")?.value.trim(); const phone = document.getElementById("registerPhone")?.value.trim(); if (!username || !password) { showToast("请输入账号与密码", "error"); return; } if (isRegisterMode) { const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailRegex.test(username)) { showToast("注册账号必须为合法有效的电子邮箱地址 (如 [email protected]),系统将向该邮箱发送激活链接!", "warning"); return; } } const endpoint = isRegisterMode ? "/api/auth/register" : "/api/auth/login"; const payload = isRegisterMode ? { username, password, display_name: displayName, phone: phone } : { username, password }; try { const resp = await fetch(endpoint, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) }); const res = await resp.json(); if (res.success && res.user) { localStorage.setItem("auth_user", JSON.stringify(res.user)); document.cookie = `auth_user=${encodeURIComponent(JSON.stringify(res.user))}; path=/; max-age=2592000; SameSite=Lax`; if (res.user.api_key) { document.cookie = `auth_token=${encodeURIComponent(res.user.api_key)}; path=/; max-age=2592000; SameSite=Lax`; if (res.user.role === 'admin') { document.cookie = `admin_token=${encodeURIComponent(res.user.api_key)}; path=/; max-age=2592000; SameSite=Lax`; } } closeLoginModal(); showToast(res.message || (isRegisterMode ? "注册成功!已开启 VIP 权益!" : "登录成功!欢迎回来!"), "success"); hydrateSsrAuth(); try { window.dispatchEvent(new Event("storage")); } catch(e) {} } else if (res.success && res.require_activation) { showToast(res.message || "注册成功!激活邮件已发送至您的注册邮箱,请在 24 小时内查收并点击激活链接验证!", "success", 10000); switchLoginTab("login"); const uInp = document.getElementById("loginUsername"); if (uInp) uInp.value = username; const pInp = document.getElementById("loginPassword"); if (pInp) { pInp.value = ""; pInp.placeholder = "••••••••"; pInp.focus(); } } else { if (res.error === "pending_activation") { showToast(res.message || "该账号尚未完成邮箱验证,无法登录!激活邮件已发送至您的注册邮箱,请先查收并点击激活链接验证。", "warning", 8000); } else { showToast(res.message || "登录/注册失败,请核对信息", "error"); } } } catch(err) { showToast("网络请求异常: " + err.message, "error"); } } window.handlePasswordLoginSubmit = handlePasswordLoginSubmit; window.handleAuthSubmit = handlePasswordLoginSubmit; async function promptResendActivation() { const currentVal = document.getElementById("loginUsername")?.value.trim() || ""; const email = prompt("请输入您注册时填写的电子邮箱以重新获取激活链接:", currentVal); if (!email || !email.trim()) return; try { const resp = await fetch("/api/auth/resend_activation", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ account: email.trim() }) }); const res = await resp.json(); if (res.success) { showToast(res.message || "激活邮件已重新发出,请前往邮箱查收!", "success", 8000); } else { showToast(res.message || "申请重发激活邮件失败", "error"); } } catch (err) { showToast("网络请求异常: " + err.message, "error"); } } window.promptResendActivation = promptResendActivation; function handleGoogleOneClickLogin() { showToast("正在跳转 Google 授权接入通道...", "info"); } window.handleGoogleOneClickLogin = handleGoogleOneClickLogin; function clearAllAuthCookies() { const cookies = ["auth_user", "admin_token", "auth_token"]; cookies.forEach(name => { document.cookie = name + "=; Path=/; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax"; }); } async function handleLogout() { try { await fetch("/api/auth/logout", { method: "POST" }); } catch(e) {} localStorage.removeItem("auth_user"); sessionStorage.clear(); clearAllAuthCookies(); showToast("已成功退出登录", "info"); hydrateSsrAuth(); try { window.dispatchEvent(new Event("storage")); } catch(e) {} } function triggerAttachmentDownload(encodedUrl, encodedName, sourceType = "") { let furl = ""; let fname = ""; try { furl = decodeURIComponent(encodedUrl); } catch(e) { furl = encodedUrl; } try { fname = decodeURIComponent(encodedName); } catch(e) { fname = encodedName; } if (!furl) { showToast("未检测到有效附件下载地址", "error"); return; } const normSourceType = (sourceType || "standard").toLowerCase(); const isBulletin = normSourceType === "bulletin"; const raw = localStorage.getItem("auth_user"); let user = null; try { if (raw) user = JSON.parse(raw); } catch(e) {} if (!user || !user.username || user.username === "guest") { if (isBulletin) { showToast("请先登录账号查看与免费下载官方随附附件!", "warning"); } else { showToast("请先登录账号查看与下载标准查新官方原件!", "warning"); } openLoginModal(); return; } const rawRole = (user.role ? String(user.role).toLowerCase().trim() : ""); const rawTier = (user.tier ? String(user.tier).toLowerCase().trim() : "free"); const isExempt = (rawRole === "admin" || ["enterprise", "admin", "corporate", "vip", "pro"].includes(rawTier)); const uid = user.id || 1; const tierParam = isExempt ? "vip" : "free"; if (isBulletin) { showToast("已登录账号,标准动态随附附件专享 0 Token 免费极速下载中...", "success"); } else { if (isExempt) { showToast("VIP / 超级管理员专享免扣点,正在为您极速调取并下载官方原件...", "success"); } else { showToast("已登录账号,正在扣除 3 Tokens 并启动下载官方原件...", "info"); } } const dlUrl = `/api/download?url=${encodeURIComponent(furl)}&name=${encodeURIComponent(fname)}&user_id=${encodeURIComponent(uid)}&tier=${encodeURIComponent(tierParam)}&source_type=${encodeURIComponent(normSourceType)}`; const a = document.createElement("a"); a.href = dlUrl; a.download = fname || "attachment"; a.target = "_blank"; document.body.appendChild(a); a.click(); setTimeout(() => a.remove(), 1000); } window.triggerAttachmentDownload = triggerAttachmentDownload; function handleAttachmentClick(btnEl) { const raw = localStorage.getItem("auth_user"); let user = null; try { if (raw) user = JSON.parse(raw); } catch(e) {} const card = btnEl ? btnEl.closest(".ssr-attachment-card") : document.querySelector(".ssr-attachment-card"); const st = (card && card.getAttribute("data-source-type")) ? card.getAttribute("data-source-type") : "standard"; const isBulletin = st === "bulletin"; if (!user || !user.username || user.username === "guest") { showToast(isBulletin ? "请先登录账号免费下载官方动态随附附件!" : "请先登录账号查看与下载标准查新官方原件!", "warning"); openLoginModal(); return; } if (card) { const furl = card.getAttribute("data-url"); const fname = card.getAttribute("data-name"); if (furl) { triggerAttachmentDownload(encodeURIComponent(furl), encodeURIComponent(fname), st); return; } } showToast(isBulletin ? "已登录账号,标准动态随附附件专享 0 Token 免费下载" : "已登录账号,点击下载按钮即可获取官方附件(VIP免扣点,普通用户消耗 3 Tokens)", "info"); } window.handleAttachmentClick = handleAttachmentClick; function handleDownloadEntryClick(e, label) { if (e && e.preventDefault) e.preventDefault(); const raw = localStorage.getItem("auth_user"); let user = null; try { if (raw) user = JSON.parse(raw); } catch(e) {} if (!user || !user.username || user.username === "guest") { showToast(`【${label || '全文通道'}】需登录账号后使用,请先登录!`, "warning"); openLoginModal(); } else { showToast("当前官方全文通道需 VIP 会员权限,升级 VIP 即可畅享极速获取原版全文!", "info"); window.location.href = "/profile.html"; } } function handleNoveltyReportClick(e, code) { const raw = localStorage.getItem("auth_user"); let user = null; try { if (raw) user = JSON.parse(raw); } catch(e) {} if (!user || !user.username || user.username === "guest") { if (e) e.preventDefault(); showToast("标准体检与查新报告功能需登录认证,请先登录!", "warning"); openLoginModal(); return false; } return true; } function hydrateSsrAuth() { let raw = localStorage.getItem("auth_user"); let user = null; try { if (raw) user = JSON.parse(raw); } catch(e) {} // 核心安全策略:若 localStorage 为空,说明已退出或未登录,彻底清理残留 Cookie,绝不从 Cookie 逆向复活! if (!user || !user.id || !user.username || user.username === "guest") { if (raw) localStorage.removeItem("auth_user"); clearAllAuthCookies(); user = null; } const isLoggedIn = user && user.username && user.username !== "guest"; if (isLoggedIn && raw) { try { document.cookie = "auth_user=" + encodeURIComponent(raw) + "; Path=/; Max-Age=2592000; SameSite=Lax"; if (user.api_key) { document.cookie = "auth_token=" + encodeURIComponent(user.api_key) + "; Path=/; Max-Age=2592000; SameSite=Lax"; } } catch(e) {} } const rawRole = (user && user.role ? String(user.role).toLowerCase().trim() : ""); const rawTier = (user && user.tier ? String(user.tier).toLowerCase().trim() : ""); let normalizedTier = "guest"; if (isLoggedIn) { if (rawRole === "admin" || ["enterprise", "admin", "corporate"].includes(rawTier)) { normalizedTier = "enterprise"; } else if (["vip", "pro"].includes(rawTier)) { normalizedTier = "vip"; } else { normalizedTier = "free"; } } const isVip = ["vip", "enterprise"].includes(normalizedTier); // 智能根据会员身份调整 CAS 详情页横幅与标准条数 (双重保险防止缓存脱节) if (isLoggedIn) { document.querySelectorAll(".guest-banner").forEach(el => { el.style.display = "none"; }); if (normalizedTier === "free") { const freeBanner = document.querySelector(".free-banner"); if (freeBanner) freeBanner.style.display = "flex"; const stdCards = document.querySelectorAll(".standard-card"); if (stdCards.length > 3) { stdCards.forEach((c, idx) => { if (idx >= 3) c.style.display = "none"; }); } const expBar = document.getElementById("stdsExpandBar"); if (expBar) expBar.style.display = "none"; const remGrid = document.getElementById("remainingStandardsGrid"); if (remGrid) remGrid.style.display = "none"; const entPill = document.querySelector(".enterprise-pill"); if (entPill) { const totalMatch = entPill.textContent.match(/\d+/); const totalCount = totalMatch ? totalMatch[0] : ""; const newBtn = document.createElement("button"); newBtn.className = "upgrade-view-all-btn"; newBtn.setAttribute("onclick", "typeof handleStandardsUpgradeClick === 'function' ? handleStandardsUpgradeClick('personal') : openMembershipModal('personal')"); newBtn.title = "升级 VIP 畅看 30 项标准与仪器基质穿透"; newBtn.innerHTML = `升级 VIP 查阅更多` + (totalCount ? `共 ${totalCount} 项` : "") + ``; entPill.parentNode.replaceChild(newBtn, entPill); } const guestBtn = document.querySelector(".upgrade-view-all-btn"); if (guestBtn) { guestBtn.setAttribute("onclick", "typeof handleStandardsUpgradeClick === 'function' ? handleStandardsUpgradeClick('personal') : openMembershipModal('personal')"); guestBtn.title = "升级 VIP 畅看 30 项标准与仪器基质穿透"; const spanTxt = guestBtn.querySelector("span:not(.count-badge)"); if (spanTxt) spanTxt.textContent = "升级 VIP 查阅更多"; } } else if (normalizedTier === "vip") { const freeBanner = document.querySelector(".free-banner"); if (freeBanner) freeBanner.style.display = "none"; const vipBanner = document.querySelector(".vip-banner"); if (vipBanner) vipBanner.style.display = "flex"; const stdCards = document.querySelectorAll(".standard-card"); if (stdCards.length > 30) { stdCards.forEach((c, idx) => { if (idx >= 30) c.style.display = "none"; }); } else { stdCards.forEach(c => c.style.display = ""); } } else if (normalizedTier === "enterprise") { document.querySelectorAll(".free-banner, .vip-banner, .guest-banner").forEach(el => { el.style.display = "none"; }); const stdCards = document.querySelectorAll(".standard-card"); stdCards.forEach(c => c.style.display = ""); } } else { const guestBanner = document.querySelector(".guest-banner"); if (guestBanner) guestBanner.style.display = "flex"; document.querySelectorAll(".free-banner, .vip-banner").forEach(el => { el.style.display = "none"; }); const stdCards = document.querySelectorAll(".standard-card"); if (stdCards.length > 3) { stdCards.forEach((c, idx) => { if (idx >= 3) c.style.display = "none"; }); } } // 1. 顶部用户胶囊(同时更新 #ssrUserArea 与 #ssrAuthUserCapsule 与 #ssrUserAreaMobile) const mobAreas = document.querySelectorAll("#ssrUserAreaMobile"); mobAreas.forEach(mobArea => { if (isLoggedIn) { const displayName = user.display_name || user.username; mobArea.innerHTML = ` ${displayName.charAt(0).toUpperCase()} `; } else { mobArea.innerHTML = ` `; } }); const userAreas = document.querySelectorAll("#ssrUserArea, #ssrAuthUserCapsule"); userAreas.forEach(userArea => { if (isLoggedIn) { const tierBadges = { admin: '🛡️ 管理员', enterprise: '🏢 企业旗舰', vip: '👑 VIP会员', free: '👤 普通用户' }; const badge = tierBadges[normalizedTier] || tierBadges.free; const displayName = user.display_name || user.username; userArea.innerHTML = `
${displayName.charAt(0).toUpperCase()} ${displayName} ${badge}
`; } else { userArea.innerHTML = `
`; } }); // 异步向服务端核验 Token 有效性,防止幽灵管理员/伪造登录态 if (isLoggedIn && user && user.api_key) { fetch("/api/auth/current_user?token=" + encodeURIComponent(user.api_key), { headers: { "Authorization": "Bearer " + user.api_key } }) .then(r => r.json()) .then(data => { if (!data || !data.authenticated) { localStorage.removeItem("auth_user"); clearAllAuthCookies(); hydrateSsrAuth(); } else if (data.user) { if (data.user.tier !== user.tier || data.user.tokens !== user.tokens) { localStorage.setItem("auth_user", JSON.stringify(data.user)); } } }) .catch(() => {}); } // 2. 附件卡片状态更新与下载通道 const attTip = document.getElementById("ssrAttachmentTip"); const cards = document.querySelectorAll(".ssr-attachment-card"); const pageIsBulletin = Array.from(cards).some(c => c.getAttribute("data-source-type") === "bulletin"); if (attTip) { if (pageIsBulletin) { attTip.innerHTML = ""; } else { if (isVip) { attTip.innerHTML = '✅ VIP专享通道已激活,免扣点极速下载官方原件'; } else if (isLoggedIn) { attTip.innerHTML = '⚡ 登录通道已激活,每次下载消耗 3 Tokens(VIP免扣点)'; } else { attTip.innerHTML = '🔐 登录账号即可查看并下载官方标准原件附件'; } } } const isExemptUser = isLoggedIn && (rawRole === "admin" || ["enterprise", "admin", "corporate", "vip", "pro"].includes(rawTier) || isVip); cards.forEach(card => { let fname = card.getAttribute("data-name") || "官方附件"; let furl = card.getAttribute("data-url") || ""; const ftype = card.getAttribute("data-type") || "FILE"; const cardSourceType = card.getAttribute("data-source-type") || (pageIsBulletin ? "bulletin" : "standard"); const isCardBulletin = cardSourceType === "bulletin"; // 健壮性增强:若当前附件 data-url 为空,尝试从页面上的直达下载卡片获取可用链接 if (!furl) { const directCard = document.querySelector(".ssr-download-card[data-url]:not([data-url=''])"); if (directCard) { const fallbackUrl = directCard.getAttribute("data-url"); if (fallbackUrl && fallbackUrl.startsWith("http")) { furl = fallbackUrl; } } } if (isCardBulletin) { // 官方公报动态随附附件:全员(含未登录访客)展示完整文件名及绿色“免费下载 ⬇”,点击未登录触发登录弹窗促活 card.className = "ssr-attachment-card p-3.5 rounded-xl border border-slate-200 dark:border-slate-800 flex items-center justify-between gap-3 bg-white dark:bg-slate-900"; const safeUrl = encodeURIComponent(furl); const safeName = encodeURIComponent(fname); const clickHandler = isLoggedIn ? `triggerAttachmentDownload('${safeUrl}', '${safeName}', 'bulletin')` : `handleAttachmentClick(this)`; card.innerHTML = `
${ftype} ${fname}
`; } else if (isLoggedIn) { card.className = "ssr-attachment-card p-3.5 rounded-xl border border-slate-200 dark:border-slate-800 flex items-center justify-between gap-3 bg-white dark:bg-slate-900"; if (furl) { const btnClass = isExemptUser ? "bg-emerald-600 hover:bg-emerald-700" : "bg-blue-600 hover:bg-blue-700"; const btnText = isExemptUser ? "VIP免扣点下载 ⬇" : "扣3点下载 ⬇"; const safeUrl = encodeURIComponent(furl); const safeName = encodeURIComponent(fname); card.innerHTML = `
${ftype} ${fname}
`; } else { card.innerHTML = `
${ftype} ${fname}
官方原件归档中 `; } } else { card.className = "ssr-attachment-card p-3.5 rounded-xl border border-slate-200 dark:border-slate-800 flex items-center justify-between gap-3 bg-white dark:bg-slate-900"; card.innerHTML = `
${ftype} ${fname}
`; } }); // 3. 全文与多源下载通道动态水合 (未登录直接隐藏,已登录展示) const dlSection = document.getElementById("ssrDownloadSection"); if (dlSection) { dlSection.style.display = isLoggedIn ? "block" : "none"; } const attWrapper = document.getElementById("ssrAttachmentsWrapper"); if (attWrapper) { attWrapper.style.display = "block"; } const dlTip = document.getElementById("ssrDownloadTip"); if (dlTip) { if (isVip) { dlTip.className = "shrink-0 text-xs font-semibold px-3 py-1.5 rounded-full bg-emerald-50 text-emerald-700 border border-emerald-200 dark:bg-emerald-950 dark:text-emerald-300 dark:border-emerald-800"; dlTip.innerHTML = "✅ VIP 尊享免扣点直通通道已激活"; } else if (isLoggedIn) { dlTip.className = "shrink-0 text-xs font-semibold px-3 py-1.5 rounded-full bg-blue-50 text-blue-700 border border-blue-200 dark:bg-blue-950 dark:text-blue-300 dark:border-blue-800"; dlTip.innerHTML = "⚡ 会员基础通道已激活"; } else { dlTip.className = "shrink-0 text-xs font-semibold px-3 py-1.5 rounded-full bg-amber-50 text-amber-700 border border-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:border-amber-800"; dlTip.innerHTML = "🔒 访客受限:登录账号或开通 VIP 畅享全文"; } } const dlCards = document.querySelectorAll(".ssr-download-card"); dlCards.forEach(card => { const url = card.getAttribute("data-url"); const name = card.getAttribute("data-name"); const label = card.getAttribute("data-label") || name; const icon = card.getAttribute("data-icon") || "📖"; if ((isVip || isLoggedIn) && url) { card.className = "ssr-download-card p-4 rounded-2xl border border-emerald-200 dark:border-emerald-800/60 bg-emerald-50/40 dark:bg-emerald-950/20 flex flex-col justify-between gap-3 shadow-sm hover:shadow transition"; const badgeText = isVip ? "免扣点直达" : "在线通道"; const badgeClass = isVip ? "bg-emerald-100 text-emerald-800 dark:bg-emerald-900/60 dark:text-emerald-200" : "bg-blue-100 text-blue-800 dark:bg-blue-900/60 dark:text-blue-200"; card.innerHTML = `
${icon} ${label}
${badgeText}
${name}
🚀 立即在线阅读 / 获取全文 ↗ `; } }); // 4. 知识图谱与拓扑关系权限门禁 (未登录提示登录查看,已登录渲染图谱) const graphGate = document.getElementById("ssrGraphLoginGate"); const graphLoading = document.getElementById("ssrGraphLoading"); const graphResetBtn = document.getElementById("ssrGraphResetBtn"); if (isLoggedIn) { if (graphGate) graphGate.style.display = "none"; if (graphResetBtn) { graphResetBtn.onclick = () => { if (window._ssrChartInstance) { window._ssrChartInstance.dispatchAction({ type: "restore" }); } }; } if (typeof initSSRGraph === "function") { initSSRGraph(); } } else { if (graphGate) graphGate.style.display = "flex"; if (graphLoading) graphLoading.style.display = "none"; if (graphResetBtn) { graphResetBtn.onclick = () => openLoginModal(); } } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", function() { hydrateSsrAuth(); const lm = document.getElementById("loginModal"); if (lm) { lm.addEventListener("click", function(e) { if (e.target === this) closeLoginModal(); }); } }); } else { hydrateSsrAuth(); const lm = document.getElementById("loginModal"); if (lm) { lm.addEventListener("click", function(e) { if (e.target === this) closeLoginModal(); }); } } window.addEventListener("storage", function(e) { if (!e.key || e.key === "auth_user") { hydrateSsrAuth(); } });