Files
basicBench/004/004_r.html
2026-01-19 21:14:58 +08:00

1151 lines
56 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BSOD Help - System_Thread_Exception - TechZone Forums</title>
<style>
/* === CSS Variables & Reset === */
:root {
--primary: #1877f2;
--secondary: #42b72a;
--bg-body: #f0f2f5;
--bg-card: #ffffff;
--text-main: #1c1e21;
--text-sub: #65676b;
--border: #dddfe2;
--header-height: 60px;
--danger: #dc3545;
--warning: #ffc107;
}
/* Dark Mode Support */
body.dark-mode {
--primary: #4599ff;
--secondary: #42b72a;
--bg-body: #18191a;
--bg-card: #242526;
--text-main: #e4e6eb;
--text-sub: #b0b3b8;
--border: #3e4042;
}
* { box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
background-color: var(--bg-body);
color: var(--text-main);
margin: 0;
line-height: 1.5;
padding-top: var(--header-height); /* Nav spacing */
transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; color: var(--primary); cursor: pointer; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; margin: 0; }
/* === Layout Components === */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.layout-grid { display: grid; grid-template-columns: 280px 1fr 300px; gap: 20px; }
/* Thread View Layout Fix */
/* 当处于帖子详情页时,我们将隐藏左侧边栏,只保留 主内容区(1fr) 和 右侧边栏(300px) */
.layout-grid.thread-view { grid-template-columns: 1fr 300px; }
.layout-grid.thread-view .sidebar { display: none; } /* 关键修复:隐藏左侧导航 */
/* Responsive */
@media (max-width: 1000px) {
.layout-grid { grid-template-columns: 1fr; }
.sidebar { display: none; } /* Hide sidebar on small screens for simplicty */
.layout-grid.thread-view { grid-template-columns: 1fr; } /* 移动端响应式 */
.layout-grid.thread-view .sidebar-right { display: none; } /* 移动端帖子页隐藏右侧栏 */
}
/* === Fixed Header === */
.site-header {
position: fixed; top: 0; left: 0; right: 0;
height: var(--header-height);
background: var(--bg-card);
border-bottom: 1px solid var(--border);
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
z-index: 1000;
display: flex; align-items: center; padding: 0 20px;
justify-content: space-between;
}
.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.search-bar { position: relative; width: 400px; }
.search-bar input {
width: 100%; padding: 8px 15px; border-radius: 20px;
border: 1px solid var(--border); background: var(--bg-body);
color: var(--text-main);
}
.nav-user { display: flex; gap: 15px; align-items: center; }
.user-avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: #ccc; cursor: pointer; }
/* === Cards & Panels === */
.card {
background: var(--bg-card);
border-radius: 8px;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
margin-bottom: 20px;
overflow: hidden;
border: 1px solid var(--border);
}
.card-header {
padding: 12px 15px; border-bottom: 1px solid var(--border);
font-weight: 600; font-size: 0.95rem; display: flex; justify-content: space-between;
}
.card-body { padding: 15px; }
/* === Forum List Styles === */
.forum-category-item { display: flex; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
.forum-category-item:hover { background: rgba(0,0,0,0.02); }
.thread-item {
display: flex; gap: 15px; padding: 15px; border-bottom: 1px solid var(--border);
transition: 0.2s;
}
.thread-item:hover { background: rgba(0,0,0,0.02); transform: translateX(5px); }
.thread-stats {
display: flex; flex-direction: column; align-items: center; min-width: 60px;
color: var(--text-sub); font-size: 0.8rem;
}
.stat-count { font-size: 1.1rem; font-weight: bold; color: var(--text-main); }
.thread-main { flex: 1; }
.thread-title { font-size: 1.1rem; font-weight: 500; margin-bottom: 5px; display: block; color: var(--text-main); }
.thread-meta { font-size: 0.85rem; color: var(--text-sub); display: flex; gap: 10px; }
.tag { padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; background: #eee; color: #555; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.blue { background: #e0f2fe; color: #0369a1; }
/* === Post View Styles (Logic Refactored from Tables to Flex) === */
.post-container { display: flex; border-bottom: 1px solid var(--border); }
.post-sidebar {
width: 180px; background: rgba(0,0,0,0.02); border-right: 1px solid var(--border);
padding: 20px; text-align: center; flex-shrink: 0;
}
.post-avatar-lg { width: 100px; height: 100px; border-radius: 4px; background: #ddd; margin-bottom: 10px; object-fit: cover; }
.user-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; font-weight: bold; margin: 5px 0; }
.post-content-area { flex: 1; padding: 20px; position: relative; min-height: 200px; }
.post-meta-header {
border-bottom: 1px dashed var(--border); padding-bottom: 10px; margin-bottom: 15px;
font-size: 0.85rem; color: var(--text-sub); display: flex; justify-content: space-between;
}
.post-body { font-size: 1rem; line-height: 1.7; min-height: 100px; }
.post-signature {
margin-top: 30px; border-top: 1px dashed var(--border); padding-top: 10px;
color: var(--text-sub); font-size: 0.85rem; font-style: italic;
}
.post-actions {
margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px;
}
.btn-action {
background: transparent; border: 1px solid transparent; color: var(--text-sub);
padding: 5px 10px; border-radius: 4px; font-size: 0.85rem; cursor: pointer;
}
.btn-action:hover { background: rgba(0,0,0,0.05); color: var(--primary); }
/* === Components === */
.btn { padding: 8px 16px; border-radius: 6px; border: none; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { opacity: 0.9; }
.btn-block { display: block; width: 100%; }
/* Pagination */
.pagination { display: flex; gap: 5px; margin-top: 20px; justify-content: center; }
.page-num {
width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
border: 1px solid var(--border); border-radius: 4px; background: var(--bg-card);
cursor: pointer;
}
.page-num.active { background: var(--primary); color: white; border-color: var(--primary); }
/* Modals */
.modal-backdrop {
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0,0,0,0.5); z-index: 2000;
display: none; justify-content: center; align-items: center;
backdrop-filter: blur(2px);
}
.modal-backdrop.show { display: flex; }
.modal-panel {
background: var(--bg-card); width: 500px; max-width: 90%;
border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
overflow: hidden; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
/* Toast */
.toast-box {
position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
background: #333; color: white; padding: 12px 24px; border-radius: 30px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 3000;
display: none; font-weight: 500;
}
/* Spam Style */
.spam-mask { opacity: 0.5; filter: grayscale(1); pointer-events: none; position: relative; }
.spam-mask::after {
content: "系统已屏蔽此内容"; position: absolute; top: 50%; left: 50%;
transform: translate(-50%, -50%); color: red; font-weight: bold; border: 2px solid red;
padding: 5px 10px; transform: rotate(-10deg);
}
/* Editor Toolbar */
.editor-toolbar {
border: 1px solid var(--border); border-bottom: none;
background: rgba(0,0,0,0.02); padding: 5px; display: flex; gap: 5px;
}
.tool-btn {
width: 30px; height: 30px; border: 1px solid transparent; background: transparent;
border-radius: 4px; cursor: pointer; display: flex; justify-content: center; align-items: center;
}
.tool-btn:hover { background: rgba(0,0,0,0.1); }
</style>
</head>
<body id="body">
<!-- Navbar -->
<header class="site-header">
<div class="logo">
<span style="font-size:2rem;">🛠️</span> TechZone
</div>
<div class="search-bar">
<input type="text" id="searchInput" placeholder="搜索帖子、用户或资源..." onkeydown="if(event.key==='Enter') doSearch()">
</div>
<div class="nav-user" id="navUser">
<button class="btn btn-primary" onclick="openModal('loginModal')">注册 / 登录</button>
</div>
</header>
<!-- Main Layout -->
<div class="container layout-grid" id="mainLayout">
<!-- Left Sidebar -->
<nav class="sidebar">
<div class="card">
<div class="card-header">板块导航</div>
<div class="card-body" style="padding:0;">
<div class="forum-category-item" onclick="switchView('home')">🏠 论坛首页</div>
<div class="forum-category-item" onclick="filterCategory('hardware')">🖥️ 硬件专区</div>
<div class="forum-category-item" onclick="filterCategory('software')">💿 软件分享</div>
<div class="forum-category-item" onclick="filterCategory('water')">🌊 灌水吐槽</div>
<div class="forum-category-item" onclick="filterCategory('market')">💹 二手交易</div>
<div class="forum-category-item" onclick="filterCategory('feedback')">📢 站务公告</div>
</div>
</div>
<div class="card">
<div class="card-header">我的状态</div>
<div class="card-body">
<p style="color:#666; font-size:0.9rem;">请先登录以查看您的积分和任务。</p>
</div>
</div>
<div class="card" style="border-color: #ffeeba; background:#fffdf5;">
<div class="card-header" style="color:#856404;">📅 每日签到</div>
<div class="card-body">
<p style="font-size:0.8rem; margin-bottom:10px;">今日已签到: 12,503 人</p>
<button class="btn btn-block" style="background:#ffc107; color:#333;" onclick="showToast('请先登录!', 'warning')">立即签到 (+5 积分)</button>
</div>
</div>
</nav>
<!-- Main Content Area -->
<main class="main-content">
<div id="loading" style="text-align:center; padding:50px;">
<div style="font-size:2rem; animation: spin 1s infinite linear;">⚙️</div>
<p>正在加载社区内容...</p>
</div>
<div id="contentArea"></div>
<!-- Old content place holder to be deleted by JS or ignored -->
<div style="display:none;">
<div class="ad-banner">
<p>【通告】2025新款显卡预售开启点击查看详情 >></p>
<p>【推荐】电脑运行慢?点击这里一键清理垃圾(专家推荐)</p>
</div>
<div class="content-wrapper">
<div class="main-column">
<div class="post-title">
<h2>[求助] 如何修复 System_Thread_Exception 蓝屏?附 Dump 文件</h2>
<p style="font-size:12px; color:#666;">状态: <strong style="color:red">[未解决]</strong> | 浏览: 45,221 | 回复: 12</p>
</div>
<div class="post-card">
<table border="1" width="100%">
<tr>
<td width="150" valign="top" class="user-info-cell">
<p><strong>Newbie_User_007</strong></p>
<p class="badge-new">等级: 萌新</p>
<p>积分: 5</p>
<p>注册时间: 2025-10-01</p>
<p><img src="" alt="默认头像"></p>
</td>
<td valign="top" class="content-cell">
<p class="post-meta"><small>发表于 2025-12-21 09:30:00 | 楼主</small></p>
<p>我的电脑最近总是蓝屏,错误代码是 System_Thread_Exception_Not_Handled。</p>
<p>配置如下:</p>
<ul>
<li>CPU: Intel i9-14900K</li>
<li>GPU: RTX 4080</li>
<li>RAM: 32G x 2</li>
</ul>
<p>我已经尝试重装系统了,但是没用。附上 Dump 文件,求大神帮忙分析!</p>
<br>
<fieldset>
<legend>附件下载</legend>
<p>文件: Minidump_20251221.zip (256 KB)</p>
<a href="#" onclick="showCustomAlert('开始下载真实文件...')">[点击下载附件]</a>
</fieldset>
<div align="center" class="fake-download-area">
<br>
<button>==> 高速下载 (推荐) <==</button>
<button>==> 极速修复蓝屏工具 <==</button>
<p><small>广告:专业系统修复,不丢失数据</small></p>
</div>
<br>
<hr style="border:0; border-top:1px dashed #ccc;">
<p style="color:#999; font-size:12px;"><em>-- 签名档:小白求带,好人一生平安。</em></p>
</td>
</tr>
<tr>
<td colspan="2" align="right" class="action-bar">
<button onclick="replyPost()">回复</button>
<button>引用</button>
<button onclick="reportPost()">举报</button>
<button>支持 (0)</button>
<button>反对 (0)</button>
</td>
</tr>
</table>
</div>
<div class="post-card spam-post">
<table border="1" width="100%">
<tr>
<td width="150" valign="top" class="user-info-cell">
<p><strong>System_Cleaner_Bot</strong></p>
<p>等级: <strong>推广大使</strong></p>
<p>积分: 99999</p>
<p><img src="" alt="VIP头像"></p>
</td>
<td valign="top" class="content-cell">
<p class="post-meta"><small>发表于 2025-12-21 09:31:05 | 沙发</small></p>
<p>检测到您的电脑存在 <strong>128</strong> 个系统错误!</p>
<p>建议立即下载 <strong>PC Master Pro</strong> 进行修复。</p>
<p>我们的软件可以解决:蓝屏、卡顿、死机、病毒。</p>
<br>
<h1><a href="#" onclick="return false;">[立即下载修复补丁]</a></h1>
<br>
<hr style="border:0; border-top:1px dashed #ccc;">
<p style="color:#999; font-size:12px;"><em>-- 签名档:官方认证,安全无毒。</em></p>
</td>
</tr>
<tr>
<td colspan="2" align="right" class="action-bar">
<button>回复</button>
<button>引用</button>
<button>举报</button>
</td>
</tr>
</table>
</div>
<div class="post-card">
<table border="1" width="100%">
<tr>
<td width="150" valign="top" class="user-info-cell">
<p><strong>Hardware_Guru</strong></p>
<p class="badge-mod">等级: <strong>版主</strong></p>
<p>积分: 54,200</p>
<p style="color:orange;">徽章: [技术大牛] [热心助人]</p>
</td>
<td valign="top" class="content-cell">
<p class="post-meta"><small>发表于 2025-12-21 09:45:12 | 板凳</small></p>
<p>楼主,看了你的配置,应该是内存超频不稳导致的。</p>
<p>你是不是开了 XMP试着进 BIOS 把内存频率降到 4800MHz 试试。</p>
<p>另外,那个二楼是广告,别点那个下载链接,那是流氓软件。</p>
<br>
<hr style="border:0; border-top:1px dashed #ccc;">
<p style="color:#999; font-size:12px;"><em>-- 签名档:有问题先看置顶帖,提问请带配置单。</em></p>
</td>
</tr>
<tr>
<td colspan="2" align="right" class="action-bar">
<button onclick="replyPost()">回复</button>
<button>引用</button>
<button>举报</button>
<button onclick="likePost(this)">支持 (52)</button>
<button>反对 (0)</button>
</td>
</tr>
</table>
</div>
<div style="border: 1px dashed #ccc; padding: 10px; margin: 10px 0; background:#fafafa; font-size:12px; color:#999;">
<p><strong>赞助商链接:</strong></p>
<ul style="list-style: none;">
<li><a href="#" style="color:#999;">玩游戏总是输?这款外挂神器帮你忙!</a></li>
<li><a href="#" style="color:#999;">月入五万的副业,点击领取教程。</a></li>
<li><a href="#" style="color:#999;">脱发怎么办?老中医祖传秘方。</a></li>
</ul>
</div>
<div class="post-card">
<table border="1" width="100%">
<tr>
<td width="150" valign="top" class="user-info-cell">
<p><strong>Newbie_User_007</strong></p>
<p class="badge-new">等级: 萌新</p>
<p>积分: 5</p>
</td>
<td valign="top" class="content-cell">
<p class="post-meta"><small>发表于 2025-12-21 10:05:00 | 地板</small></p>
<div style="background:#f0f0f0; padding:10px; margin-bottom:10px;">回复 3楼</div>
<p>谢谢大佬!我确实开了 XMP。我现在去试试关闭。</p>
<p>顺便问一下,显卡驱动需要回退吗?</p>
<br>
<hr style="border:0; border-top:1px dashed #ccc;">
<p style="color:#999; font-size:12px;"><em>-- 签名档:小白求带,好人一生平安。</em></p>
</td>
</tr>
<tr>
<td colspan="2" align="right" class="action-bar">
<button onclick="replyPost()">回复</button>
<button>引用</button>
<button>举报</button>
<button>支持 (0)</button>
<button>反对 (0)</button>
</td>
</tr>
</table>
</div>
<div class="post-card">
<table border="1" width="100%">
<tr>
<td width="150" valign="top" class="user-info-cell">
<p><strong>Troll_Master_123</strong></p>
<p>等级: 潜水员</p>
<p>积分: -20</p>
</td>
<td valign="top" class="content-cell">
<p class="post-meta"><small>发表于 2025-12-21 10:15:33 | 5楼</small></p>
<p>这配置还蓝屏?肯定是楼主买到矿卡了。</p>
<p>现在的 Intel 缩缸很严重,建议直接换 AMD保平安。</p>
<p>你要是不会修,五十块钱卖我算了。</p>
<br>
<hr style="border:0; border-top:1px dashed #ccc;">
<p style="color:#999; font-size:12px;"><em>-- 签名档:没有任何签名。</em></p>
</td>
</tr>
<tr>
<td colspan="2" align="right" class="action-bar">
<button onclick="replyPost()">回复</button>
<button>引用</button>
<button onclick="reportPost()">举报</button>
<button>支持 (1)</button>
<button>反对 (88)</button>
</td>
</tr>
</table>
</div>
<div class="post-card">
<table border="1" width="100%">
<tr>
<td width="150" valign="top" class="user-info-cell">
<p><strong>Passerby_A</strong></p>
<p>等级: 核心会员</p>
<p>积分: 888</p>
</td>
<td valign="top" class="content-cell">
<p class="post-meta"><small>发表于 2025-12-21 10:20:00 | 6楼</small></p>
<hr>
<p>Mark一下我也有这个问题。关注后续。</p>
<br>
<hr style="border:0; border-top:1px dashed #ccc;">
</td>
</tr>
<tr>
<td colspan="2" align="right" class="action-bar">
<button>回复</button>
<button>引用</button>
<button>举报</button>
</td>
</tr>
</table>
</div>
<br>
<div align="center" style="padding: 20px;">
<a href="#" class="btn-primary" style="background:white; color:#333; border:1px solid #ccc;">首页</a>
<a href="#" class="btn-primary" style="background:white; color:#333; border:1px solid #ccc;">上一页</a>
<strong>[1]</strong> <a href="#">2</a> <a href="#">3</a> ... <a href="#">99</a>
<a href="#" class="btn-primary" style="background:white; color:#333; border:1px solid #ccc;">下一页</a>
</div>
<br>
<div class="quick-reply">
<h3>快速回复</h3>
<form>
<textarea rows="5" cols="80"></textarea><br>
<input type="checkbox"> 签名
<input type="checkbox"> 匿名
<button class="btn-primary">发表回复</button>
</form>
</div>
</div>
<div class="side-column">
<div class="sidebar-box">
<h3>版块热门推荐</h3>
<ul>
<li><a href="#">[置顶] 显卡天梯图 2025.12版</a></li>
<li><a href="#">[精华] 电源选购指南:别再买炸弹了</a></li>
<li><a href="#">救命!电脑冒烟了怎么办?</a></li>
<li><a href="#">4090Ti 偷跑数据曝光!</a></li>
</ul>
</div>
<div class="sidebar-box" style="border-color: #ffeeba;">
<h3 style="color:#856404; border-color:#856404;">精彩活动</h3>
<ul>
<li><a href="#">[广告] 注册送 88元 现金红包</a></li>
<li><a href="#">[广告] 只有男人才懂的游戏</a></li>
<li><a href="#">[广告] 免费领取 1TB 云空间</a></li>
</ul>
</div>
<div class="sidebar-box">
<h3>在线统计</h3>
<p>在线会员: 1205 人</p>
<p>游客: 8841 人</p>
<p>今日发帖: 342</p>
</div>
</div>
</div>
</div> <!-- /End hidden content -->
</main>
<!-- Right Sidebar -->
<aside class="sidebar-right">
<div class="card">
<div class="card-header">🔥 24小时热帖</div>
<div class="card-body" style="padding:0;">
<ul id="hotThreadsList" style="padding:0; margin:0;">
<!-- JS Generated -->
</ul>
</div>
</div>
<div class="card">
<div class="card-header">📊 社区统计</div>
<div class="card-body" style="font-size:0.85rem; line-height:2;">
<div>在线会员: <strong style="color:green">1,024</strong></div>
<div>今日发帖: <strong>5,231</strong></div>
<div>总帖子数: <strong>8.4M</strong></div>
<div>服务器延迟: <span id="pingValue">12ms</span></div>
</div>
</div>
</aside>
</div>
<!-- Modals -->
<div class="modal-backdrop" id="confirmModal">
<div class="modal-panel" style="width: 400px;">
<div class="card-header">
操作确认 <span style="cursor:pointer; float:right;" onclick="closeModal('confirmModal')">&times;</span>
</div>
<div class="card-body">
<p id="confirmMessage" style="margin-bottom: 20px;">确定执行此操作?</p>
<div style="text-align: right;">
<button class="btn" onclick="closeModal('confirmModal')">取消</button>
<button class="btn btn-primary" id="confirmBtnAction">确定</button>
</div>
</div>
</div>
</div>
<div class="modal-backdrop" id="alertModal">
<div class="modal-panel" style="width: 400px;">
<div class="card-header">
提示 <span style="cursor:pointer; float:right;" onclick="closeModal('alertModal')">&times;</span>
</div>
<div class="card-body">
<p id="alertMessage" style="margin-bottom: 20px;"></p>
<div style="text-align: right;">
<button class="btn btn-primary" onclick="closeModal('alertModal')">知道了</button>
</div>
</div>
</div>
</div>
<div class="modal-backdrop" id="loginModal">
<div class="modal-panel">
<div class="card-header">
用户登录 <span style="cursor:pointer; float:right;" onclick="closeModal('loginModal')">&times;</span>
</div>
<div class="card-body">
<div style="margin-bottom:15px;">
<label style="display:block; margin-bottom:5px;">用户名 / 邮箱</label>
<input type="text" id="loginUser" class="form-control" style="width:100%; padding:8px;" value="TechUser_2026">
</div>
<div style="margin-bottom:20px;">
<label style="display:block; margin-bottom:5px;">密码</label>
<input type="password" class="form-control" style="width:100%; padding:8px;" value="123456">
</div>
<button class="btn btn-primary btn-block" onclick="doLogin()">登录</button>
</div>
</div>
</div>
<div class="modal-backdrop" id="newThreadModal">
<div class="modal-panel" style="width:800px;">
<div class="card-header">
发布新主题 <span style="cursor:pointer; float:right;" onclick="closeModal('newThreadModal')">&times;</span>
</div>
<div class="card-body">
<input type="text" id="newPostTitle" placeholder="请输入标题..." style="width:100%; padding:10px; font-size:1.1rem; margin-bottom:10px; border:1px solid #ddd; border-radius:4px;">
<div class="editor-toolbar">
<button class="tool-btn"><b>B</b></button>
<button class="tool-btn"><i>I</i></button>
<button class="tool-btn"><u>U</u></button>
<button class="tool-btn" onclick="insertText(' [code] ', ' [/code] ')">Code</button>
<button class="tool-btn">🔗</button>
<button class="tool-btn">📷</button>
</div>
<textarea id="newPostContent" style="width:100%; height:300px; padding:10px; border:1px solid #ddd; border-top:none; resize:vertical;" placeholder="请详细描述您的问题..."></textarea>
<div style="margin-top:10px; text-align:right;">
<button class="btn" onclick="closeModal('newThreadModal')">取消</button>
<button class="btn btn-primary" onclick="submitNewThread()">发布帖子</button>
</div>
</div>
</div>
</div>
<div class="toast-box" id="toast"></div>
<script>
// === Single Page Application Logic (SPA) ===
// --- Custom Alert/Confirm Logic ---
let onConfirmCallback = null;
function showCustomAlert(msg) {
document.getElementById('alertMessage').innerText = msg;
openModal('alertModal');
}
function showCustomConfirm(msg, callback) {
document.getElementById('confirmMessage').innerText = msg;
onConfirmCallback = callback;
openModal('confirmModal');
}
// Bind Confirm Action
document.addEventListener('DOMContentLoaded', () => {
const confirmBtn = document.getElementById('confirmBtnAction');
if(confirmBtn) {
confirmBtn.addEventListener('click', () => {
if (typeof onConfirmCallback === 'function') {
onConfirmCallback();
}
closeModal('confirmModal');
});
}
});
const DB = {
users: [
{ id: 1, name: 'System_Admin', role: 'admin', avatar: 'https://ui-avatars.com/api/?name=SA&background=0D8ABC&color=fff' },
{ id: 2, name: 'Hardware_Guru', role: 'mod', avatar: 'https://ui-avatars.com/api/?name=HG&background=ff5722&color=fff' },
{ id: 3, name: 'Newbie_User_007', role: 'user', avatar: 'https://ui-avatars.com/api/?name=NU&background=4caf50&color=fff' },
{ id: 99, name: 'Spam_Bot_X', role: 'banned', avatar: '' }
],
threads: [], // Will be generated
};
const STATE = {
currentUser: null, // null = guest
currentView: 'home',
currentCategory: 'all',
viewingThreadId: null,
notifications: [],
page: 1
};
// --- Mock Data Generator ---
function initData() {
// 预设的高质量模拟数据源
const mockSources = [
{
title: "RTX 5090 性能偷跑,功耗高达 600W",
cat: "hardware",
content: "据外媒爆料,下一代旗舰显卡 RTX 5090 的 TGP 可能高达 600W。这意味着现有的 ATX 3.0 电源可能都要退役了。<br><br>从泄露的 PCB 设计图来看,核心面积比 4090 增加了 15%,显存可能采用 GDDR7。大家怎么看我是准备换电源了。",
replies: ["600W这不得开个空调对着吹", "电费伤不起啊,还是继续用我的 1060 吧。", "AMD Yes! 只要苏妈不跟进这种功耗竞赛。", "消息保真吗?感觉像是烟雾弹。", "正好冬天到了,不仅能玩游戏还能取暖,赢麻了!"]
},
{
title: "求助Win12 更新后蓝屏 Critical_Process_Died",
cat: "software",
content: "昨晚手贱更新了 Windows 12 预览版Build 26000重启后直接蓝屏进不去系统。<br><br>错误代码Critical_Process_Died。<br>尝试过安全模式也进不去,手头没有 PE 盘。里面有重要的毕业论文,求大神支招!不要重装系统啊!",
replies: ["预览版也敢主力机更新?勇士。", "试试制作一个 Linux Live USB 进去把文件拷出来。", "可能是驱动冲突,进 RE 模式回退更新试试。", "Critical_Process_Died 一般是系统核心文件损坏,大概率要重装了。", "没有备份吗?那基本凉了。"]
},
{
title: "【装机作业】白色海景房,颜值即正义!",
cat: "hardware",
content: "心心念念的白色海景房终于装好了!<br><br>配置单:<br>- CPU: i7-14700K<br>- MB: ROG Z790吹雪<br>- RAM: 威刚 吹雪联名 D5 6400<br>- GPU: 影驰 名人堂 4080<br>- Case: 联力 O11D Evo<br><br>[图片] 效果炸裂,光污染拉满。就是理线理得我腰酸背痛。",
replies: ["富哥V50看看实力。", "这理线水平可以啊,强迫症表示很舒适。", "全白确实好看,就是容易积灰,记得常清理。", "我也准备抄作业,这一套下来得 2W 吧?", "只有我关注桌子也是白的吗?"]
},
{
title: "Python 爬虫总是被封 IP 怎么办?",
cat: "software",
content: "最近在写一个爬虫抓取某电商平台的数据,但是频率稍微高一点就 403 Forbidden。<br><br>已经加了 User-Agent 池,延时也设了随机 1-3 秒,还是不行。是不是必须得上收费代理了?有没有开源好用的代理池推荐?",
replies: ["现在的反爬都很智能了,光换 UA 没用的。", "建议买隧道代理,免费的不稳定而且慢。", "看看有没有验证码或者 Cookie 追踪,封 IP 只是最后手段。", "降低频率吧,或者用 Selenium 模拟浏览器行为。", "少爬点吧,小心律师函警告 [滑稽]"]
},
{
title: "AMD YES! Ryzen 9000 系列参数前瞻",
cat: "hardware",
content: "AMD 官方 PPT 终于放出来了Zen 5 架构 IPC 提升 15%<br><br>最关键的是,积热问题似乎得到了改善。首发价格如果能维持在 7000 系列的水平Intel 这一代又要被吊打了。大家冲不冲?",
replies: ["AMD Yes! 喊就完事了。", "首发肯定贵,等半年降价才是 真·YES。", "只要不换主板接口,我就冲。", "积热改善?我不信,除非你有实测。", "Intel 15代也要出来了如果不急可以再等等。"]
},
{
title: "机械键盘轴体推荐:红轴还是茶轴?",
cat: "hardware",
content: "想入把机械键盘办公用,偶尔打打 LOL。<br><br>之前用过青轴,太吵了被同事投诉。现在纠结红轴和茶轴,听说红轴软绵绵的?茶轴又有段落感?<br>要求:声音小,手感好,久打不累。",
replies: ["办公绝对红轴,行云流水。", "茶轴是万用轴,有段落感打字比较爽。", "这就不得不推荐金粉轴了,比红轴还轻,办公神器。", "建议买个试轴器,几十块钱,把所有轴都摸一遍。", "静电容一步到位,退烧之选。"]
},
{
title: "显示器选购指南IPS vs OLED",
cat: "hardware",
content: "现在的 OLED 显示器越来越便宜了27寸 2K 240Hz 只要 3000 多。<br><br>但是很担心烧屏问题。我是重度 Windows 用户任务栏常驻。IPS 的 Nano-IPS 面板对比度又不行。到底该怎么选?主要用途是看电影和 3A 游戏。",
replies: ["看电影绝对 OLED黑场效果无敌。", "重度办公就算了吧,半年必烧。", "现在的 OLED 都有防烧屏技术,没那么脆弱。", "Mini-LED 考虑一下?折中方案。", "只要你有钱,坏了就换,那就无脑 OLED。"]
},
{
title: "公司服务器被雷劈了,如何恢复数据?",
cat: "water",
content: "真实惨案。昨天雷雨天机房不知怎么回事遭雷击了UPS 也没抗住。<br><br>现在 RAID 卡报错,有两块盘亮红灯。虽然有异地备份,但是是一周前的... 老板脸都绿了,让我死马当活马医,求靠谱的数据恢复机构!",
replies: ["这是物理损坏了,软件没救的,找专业开盘公司吧。", "同情楼主,这锅不该你背,是机房建设的问题。", "以前我们也遇到过,花了十几万才找回部分数据。", "千万别通电了!越通电损坏越严重!", "一周前的备份不错了,要是没备份你现在已经失业了。"]
},
{
title: "小白求推荐 3000 元价位组装机",
cat: "hardware",
content: "预算只有 3000想组一台能玩《黑神话悟空》的主机。<br><br>不要求全高画质1080P 中画质流畅就行。目前看了 12400F + 6600 的组合,这套稳吗?还是说等等党终将胜利?",
replies: ["3000 玩 3A 有点勉强,建议加钱上 4060。", "12400F + 6600 性价比很高1080P 没问题。", "二手市场淘一淘3000 能收到不错的配置。", "电源别省,炸了就是全家桶。", "黑悟空优化怎么样还不知道,建议等游戏出了再买。"]
},
{
title: "Linux 下如何配置 Nginx 反向代理?",
cat: "software",
content: "我在 Ubuntu 上部署了一个 Node.js 服务,跑在 3000 端口。<br><br>现在想通过域名直接访问,配置了 Nginx 的 proxy_pass但是静态资源全都 404 了。有没有完整的 conf 模板可以参考一下?我是新手,文档看不太懂。",
replies: ["静态资源要单独配 root 或 alias。", "直接贴你的配置文件出来,不然怎么帮你改?", "建议用 Docker 部署 Nginx Proxy Manager图形化界面很方便。", "chatGPT 很擅长写配置,直接问它。", "注意 location 的匹配优先级,可能是被覆盖了。"]
}
];
for (let i = 0; i < 45; i++) {
const seed = mockSources[i % mockSources.length]; // 循环使用模板
const author = DB.users[Math.floor(Math.random() * 3)];
// 随机波动回复数和浏览量
const replyCount = Math.floor(Math.random() * 150) + (seed.replies.length * 5);
const viewCount = replyCount * (Math.floor(Math.random() * 40) + 20);
// 稍微修改标题以避免完全重复
let titleVariant = seed.title;
if (i >= mockSources.length) {
const suffixes = ["(求助)", "[讨论]", "...", "!!", "(更新)"];
titleVariant += " " + suffixes[i % suffixes.length];
}
// 将预设回复存入 customReplies 属性,以便详情页生成时调用
DB.threads.push({
id: 1000 + i,
title: titleVariant,
author: author,
date: new Date(Date.now() - Math.floor(Math.random() * 2000000000)).toISOString(),
category: seed.cat,
views: viewCount,
replies: replyCount,
isHot: replyCount > 80,
content: seed.content, // 使用真实内容
mockReplies: seed.replies // 传递特定话题的回复池
});
}
// Add fake sidebar hot data
const hotList = document.getElementById('hotThreadsList');
DB.threads.slice(0, 5).sort((a,b) => b.replies - a.replies).forEach(t => {
hotList.innerHTML += `
<li class="thread-item" style="padding:10px; border:none;" onclick="openThread(${t.id})">
<span style="color:var(--primary); font-weight:bold;">${t.replies}</span>
<a href="javascript:void(0)" style="margin-left:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">${t.title}</a>
</li>`;
});
}
// --- Core View Logic ---
function renderApp() {
const container = document.getElementById('contentArea');
container.innerHTML = '';
document.getElementById('loading').style.display = 'block';
// Simulate network delay
setTimeout(() => {
document.getElementById('loading').style.display = 'none';
if (STATE.currentView === 'home') {
renderHome(container);
} else if (STATE.currentView === 'thread') {
renderThreadDetail(container, STATE.viewingThreadId);
}
// Update UI User State
updateUserUI();
}, 300);
}
function renderHome(container) {
// Filter Logic
let data = DB.threads;
if (STATE.currentCategory !== 'all') {
data = data.filter(t => t.category === STATE.currentCategory);
}
// Toolbar
const toolbar = document.createElement('div');
toolbar.className = 'card';
toolbar.innerHTML = `
<div class="card-body" style="display:flex; justify-content:space-between; align-items:center; padding:10px 15px;">
<div>
<span style="font-weight:bold; font-size:1.1rem;">${getCategoryName(STATE.currentCategory)}</span>
<span style="color:#888; margin-left:10px; font-size:0.9rem;">共 ${data.length} 个主题</span>
</div>
<div>
<button class="btn btn-primary" onclick="openModal('newThreadModal')">✍️ 发帖</button>
<select style="padding:5px; border-radius:4px; border:1px solid #ddd; margin-left:10px;" onchange="showToast('排序功能开发中...', 'info')">
<option>最新回复</option>
<option>最新发布</option>
<option>最多浏览</option>
</select>
</div>
</div>
`;
container.appendChild(toolbar);
// List
const listCard = document.createElement('div');
listCard.className = 'card';
// Header
listCard.innerHTML = `<div class="card-header" style="color:#666; font-size:0.8rem;">
<span style="flex:1;">主题</span>
<span style="width:100px; text-align:center;">作者</span>
<span style="width:80px; text-align:center;">回复/查看</span>
<span style="width:120px; text-align:right;">最后发表</span>
</div>`;
const listBody = document.createElement('div');
data.slice(0, 15).forEach(t => {
const row = document.createElement('div');
row.className = 'thread-item';
row.onclick = () => openThread(t.id);
row.style.cursor = 'pointer';
let tagsHtml = '';
if(t.isHot) tagsHtml += `<span class="tag red">HOT</span> `;
if(t.category === 'hardware') tagsHtml += `<span class="tag blue">硬件</span> `;
row.innerHTML = `
<div class="thread-stats">
<span class="stat-count">${t.replies}</span>
</div>
<div class="thread-main">
<span class="thread-title">${tagsHtml}${t.title}</span>
<span class="thread-meta">
发布于 ${formatDate(t.date)}
${t.replies > 50 ? '🔥' : ''}
</span>
</div>
<div style="width:100px; text-align:center; font-size:0.85rem;">
<img src="${t.author.avatar}" style="width:20px; vertical-align:middle; border-radius:50%;">
${t.author.name}
</div>
<div style="width:120px; text-align:right; font-size:0.8rem; color:#888;">
${timeAgo(t.date)}
</div>
`;
listBody.appendChild(row);
});
listCard.appendChild(listBody);
// Manual Pagination
const pagination = document.createElement('div');
pagination.className = 'pagination';
pagination.innerHTML = `
<div class="page-num active">1</div>
<div class="page-num">2</div>
<div class="page-num">3</div>
<div class="page-num">...</div>
<div class="page-num">9</div>
`;
container.appendChild(listCard);
container.appendChild(pagination);
}
function renderThreadDetail(container, threadId) {
const thread = DB.threads.find(t => t.id === threadId);
if(!thread) { container.innerHTML = "Thread Not Found"; return; }
// Breadcrumb
container.innerHTML = `
<div style="margin-bottom:15px; font-size:0.9rem;">
<a onclick="switchView('home')">首页</a> &gt; ${getCategoryName(thread.category)} &gt; 正文
</div>
<div class="card">
<div class="post-title" style="border:none; border-bottom:1px solid var(--border);">
<h1 style="font-size:1.5rem; margin:0;">${thread.title}</h1>
<div style="margin-top:10px; font-size:0.85rem; color:#666;">
<span style="color:red;">[阅读权限 10]</span>
浏览: ${thread.views} | 回复: ${thread.replies}
</div>
</div>
</div>
`;
// Generate Posts (Mock Replies)
const posts = generateMockReplies(thread);
posts.forEach((post, index) => {
const isLouZhu = index === 0;
const postEl = document.createElement('div');
postEl.className = 'card';
if(post.isSpam) postEl.classList.add('spam-mask'); // CSS logic for spam
postEl.innerHTML = `
<div class="post-container">
<div class="post-sidebar">
<img src="${post.author.avatar}" class="post-avatar-lg">
<div style="font-weight:bold; color:var(--primary);">${post.author.name}</div>
<div class="user-badge" style="background:${post.author.role === 'admin' ? '#000' : '#eee'}; color:${post.author.role === 'admin' ? '#fff' : '#333'}">
${post.author.role.toUpperCase()}
</div>
<ul style="font-size:0.8rem; text-align:left; margin-top:10px; color:#666; padding-left:10px;">
<li>UID: ${post.author.id}</li>
<li>帖子: ${Math.floor(Math.random()*1000)}</li>
<li>金币: ${Math.floor(Math.random()*5000)}</li>
</ul>
</div>
<div class="post-content-area">
<div class="post-meta-header">
<span>发表于 ${formatDate(post.date)} ${isLouZhu ? '<span class="tag red">楼主</span>' : `#${index}`}</span>
<span>只看该作者 | 倒序排列</span>
</div>
<div class="post-body">
${post.content}
${post.attachment ? renderAttachment(post.attachment) : ''}
</div>
<div class="post-signature">
${post.signature || '这个人很懒,什么都没写。'}
</div>
<div class="post-actions">
<button class="btn-action" onclick="showToast('已举报', 'success')">举报</button>
<button class="btn-action">支持(${Math.floor(Math.random()*10)})</button>
<button class="btn-action" onclick="openReply()">回复</button>
</div>
</div>
</div>
`;
container.appendChild(postEl);
});
// Quick Reply Box
const replyBox = document.createElement('div');
replyBox.className = 'card';
replyBox.innerHTML = `
<div class="card-header">快速回复</div>
<div class="card-body">
<textarea style="width:100%; height:100px; padding:10px; border:1px solid #ddd;"></textarea>
<button class="btn btn-primary" style="margin-top:10px;" onclick="showToast('回复成功!(+1 积分)', 'success')">发表回复</button>
</div>
`;
container.appendChild(replyBox);
}
// --- Utils & Helpers ---
function generateMockReplies(thread) {
// Always include the OP
const list = [{
author: thread.author,
date: thread.date,
content: thread.content, // Now uses the realistic content content from initData
signature: "System.out.println('Hello World');",
attachment: thread.category === 'software' ? { name: "Error_Log.txt", size: "256 KB" } :
thread.category === 'hardware' ? { name: "BIOS_Backup.bin", size: "16 MB" } : null
}];
// Context-aware reply pool
const genericReplies = [
"楼主好人一生平安。", "这个教程太详细了,必须收藏!",
"前排围观大神。", "我也觉得是这样,完全同意。",
"有一说一,这个性价比确实高。", "建议楼主左转图吧,那里老哥个个是人才。",
"路过帮顶。", "不明觉厉。", "火钳刘明。"
];
// Use thread-specific replies first, then generic ones
const availableReplies = (thread.mockReplies && thread.mockReplies.length > 0)
? [...thread.mockReplies, ...genericReplies]
: genericReplies;
// Generate random replies (between 3 and 10)
const count = Math.floor(Math.random() * 8) + 3;
for(let i=0; i<count; i++) {
// Pick a reply and ensure we don't repeat too often if possible
const replyText = availableReplies[i % availableReplies.length];
list.push({
author: DB.users[Math.floor(Math.random() * DB.users.length)],
date: new Date(new Date(thread.date).getTime() + (i+1)*Math.random()*3600000).toISOString(), // Time progresses
content: replyText,
signature: `Signature_User_${Math.floor(Math.random()*999)}`
});
}
return list;
}
function renderAttachment(att) {
return `
<fieldset style="border:1px solid #ddd; padding:10px; margin-top:20px; background:#f9f9f9;">
<legend style="font-weight:bold;">附件</legend>
📄 ${att.name} (${att.size}) <a href="#">[点击下载]</a>
</fieldset>
`;
}
function getCategoryName(cat) {
const map = { all: '全部主题', hardware: '硬件专区', software: '软件分享', water: '灌水吐槽', market: '二手交易', feedback: '站务公告' };
return map[cat] || '未知板块';
}
// --- Actions ---
function switchView(viewName) {
STATE.currentView = viewName;
// Reset layout if needed
document.getElementById('mainLayout').className = viewName === 'thread' ? 'container layout-grid thread-view' : 'container layout-grid';
renderApp();
}
function openThread(id) {
STATE.viewingThreadId = id;
switchView('thread');
}
function filterCategory(cat) {
STATE.currentCategory = cat;
switchView('home');
}
// Modal & Toast
function openModal(id) {
document.getElementById(id).classList.add('show');
}
function closeModal(id) {
document.getElementById(id).classList.remove('show');
}
function showToast(msg, type) {
const t = document.getElementById('toast');
t.innerText = msg;
t.style.display = 'block';
t.style.background = type === 'warning' ? '#ff9800' : (type === 'success' ? '#4caf50' : '#333');
setTimeout(() => t.style.display = 'none', 3000);
}
// Auth Simulation
function doLogin() {
const user = document.getElementById('loginUser').value;
closeModal('loginModal');
STATE.currentUser = { name: user || "User" };
showToast(`欢迎回来,${STATE.currentUser.name}`, 'success');
updateUserUI();
}
function updateUserUI() {
const nav = document.getElementById('navUser');
if (STATE.currentUser) {
nav.innerHTML = `
<div style="display:flex; align-items:center; gap:10px; cursor:pointer;">
<span style="font-weight:bold;">${STATE.currentUser.name}</span>
<div class="user-avatar-sm" style="background:#4caf50;"></div>
<button class="btn" style="padding:2px 8px; font-size:0.8rem;" onclick="location.reload()">注销</button>
</div>
`;
}
}
function formatDate(iso) {
return iso.replace('T', ' ').substring(0, 16);
}
function timeAgo(props) {
return "1小时前"; // Simplified
}
function insertText(prefix, suffix) {
const area = document.getElementById('newPostContent');
area.value += prefix + suffix;
}
function submitNewThread() {
closeModal('newThreadModal');
showToast('发布成功!(模拟)', 'success');
// Fake add
setTimeout(() => {
DB.threads.unshift({
id: 9999,
title: document.getElementById('newPostTitle').value || "无标题",
author: STATE.currentUser || DB.users[2],
replies: 0, views: 1, category: 'hardware',
date: new Date().toISOString(),
isHot: false
});
renderHome(document.getElementById('contentArea'));
}, 500);
}
// --- Init ---
window.onload = function() {
initData();
renderApp();
// Background Ping Simulation
setInterval(() => {
const ms = Math.floor(Math.random() * 50) + 10;
document.getElementById('pingValue').innerText = ms + 'ms';
document.getElementById('pingValue').style.color = ms > 100 ? 'red' : 'green';
}, 2000);
};
</script>
</body>
</html>