337 lines
10 KiB
HTML
337 lines
10 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>🔧 清除缓存并修复AI知识问答功能</title>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
min-height: 100vh;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 20px;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
.container {
|
||
background: white;
|
||
border-radius: 20px;
|
||
padding: 40px;
|
||
max-width: 800px;
|
||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
||
}
|
||
|
||
.header {
|
||
text-align: center;
|
||
margin-bottom: 30px;
|
||
}
|
||
|
||
.icon {
|
||
font-size: 64px;
|
||
margin-bottom: 15px;
|
||
animation: pulse 2s infinite;
|
||
}
|
||
|
||
@keyframes pulse {
|
||
0%, 100% { transform: scale(1); }
|
||
50% { transform: scale(1.1); }
|
||
}
|
||
|
||
h1 {
|
||
color: #333;
|
||
font-size: 28px;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.subtitle {
|
||
color: #666;
|
||
font-size: 16px;
|
||
}
|
||
|
||
.alert {
|
||
background: #fff3cd;
|
||
border-left: 4px solid #ffc107;
|
||
padding: 15px;
|
||
margin: 20px 0;
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.alert-error {
|
||
background: #f8d7da;
|
||
border-left: 4px solid #dc3545;
|
||
}
|
||
|
||
.alert-success {
|
||
background: #d4edda;
|
||
border-left: 4px solid #28a745;
|
||
}
|
||
|
||
.section {
|
||
margin: 25px 0;
|
||
padding: 20px;
|
||
background: #f8f9fa;
|
||
border-radius: 12px;
|
||
}
|
||
|
||
.section h2 {
|
||
color: #667eea;
|
||
font-size: 20px;
|
||
margin-bottom: 15px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
|
||
.step {
|
||
background: white;
|
||
padding: 15px;
|
||
margin: 10px 0;
|
||
border-radius: 8px;
|
||
border-left: 3px solid #667eea;
|
||
}
|
||
|
||
.step-number {
|
||
display: inline-block;
|
||
width: 28px;
|
||
height: 28px;
|
||
background: #667eea;
|
||
color: white;
|
||
border-radius: 50%;
|
||
text-align: center;
|
||
line-height: 28px;
|
||
font-weight: bold;
|
||
margin-right: 10px;
|
||
}
|
||
|
||
.button {
|
||
display: inline-block;
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
color: white;
|
||
padding: 12px 30px;
|
||
border-radius: 25px;
|
||
text-decoration: none;
|
||
font-weight: bold;
|
||
margin: 10px 5px;
|
||
transition: transform 0.2s;
|
||
border: none;
|
||
cursor: pointer;
|
||
font-size: 16px;
|
||
}
|
||
|
||
.button:hover {
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
|
||
}
|
||
|
||
.button-success {
|
||
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
||
}
|
||
|
||
.keyboard {
|
||
background: #333;
|
||
color: white;
|
||
padding: 5px 10px;
|
||
border-radius: 5px;
|
||
font-family: 'Courier New', monospace;
|
||
font-size: 14px;
|
||
display: inline-block;
|
||
margin: 0 3px;
|
||
}
|
||
|
||
.checklist {
|
||
list-style: none;
|
||
}
|
||
|
||
.checklist li {
|
||
padding: 10px;
|
||
margin: 8px 0;
|
||
background: white;
|
||
border-radius: 6px;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.checklist li:before {
|
||
content: "☐";
|
||
font-size: 24px;
|
||
margin-right: 12px;
|
||
color: #667eea;
|
||
}
|
||
|
||
.code {
|
||
background: #282c34;
|
||
color: #61dafb;
|
||
padding: 15px;
|
||
border-radius: 8px;
|
||
font-family: 'Courier New', monospace;
|
||
margin: 15px 0;
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.tips {
|
||
background: #e7f3ff;
|
||
border-left: 4px solid #2196F3;
|
||
padding: 15px;
|
||
margin: 15px 0;
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.tips strong {
|
||
color: #1976D2;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<div class="header">
|
||
<div class="icon">🔧</div>
|
||
<h1>AI知识问答功能修复</h1>
|
||
<p class="subtitle">快速解决 ERR_CONNECTION_REFUSED 错误</p>
|
||
</div>
|
||
|
||
<div class="alert alert-error">
|
||
<strong>⚠️ 当前错误:</strong><br>
|
||
Failed to load resource: net::ERR_CONNECTION_REFUSED
|
||
</div>
|
||
|
||
<div class="alert alert-success">
|
||
<strong>✅ 已完成修复:</strong><br>
|
||
• 路径匹配逻辑已优化<br>
|
||
• 统计数据计算已加强安全性<br>
|
||
• 现在需要清除浏览器缓存使修复生效
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h2>🚀 快速修复步骤</h2>
|
||
|
||
<div class="step">
|
||
<span class="step-number">1</span>
|
||
<strong>打开开发者工具</strong><br>
|
||
按 <span class="keyboard">F12</span> 或 <span class="keyboard">Ctrl + Shift + I</span>
|
||
(Mac: <span class="keyboard">Cmd + Option + I</span>)
|
||
</div>
|
||
|
||
<div class="step">
|
||
<span class="step-number">2</span>
|
||
<strong>清空缓存并硬性重新加载</strong><br>
|
||
• <span class="keyboard">右键点击</span> 浏览器刷新按钮<br>
|
||
• 选择 <strong>"清空缓存并硬性重新加载"</strong> (Empty Cache and Hard Reload)
|
||
</div>
|
||
|
||
<div class="step">
|
||
<span class="step-number">3</span>
|
||
<strong>如果问题仍存在,完全清除缓存</strong><br>
|
||
按 <span class="keyboard">Ctrl + Shift + Delete</span>
|
||
(Mac: <span class="keyboard">Cmd + Shift + Delete</span>)<br>
|
||
• 勾选 "缓存的图片和文件"<br>
|
||
• 时间范围选择 "全部时间"<br>
|
||
• 点击 "清除数据"
|
||
</div>
|
||
|
||
<div class="step">
|
||
<span class="step-number">4</span>
|
||
<strong>重启开发服务器</strong><br>
|
||
在终端中:
|
||
<div class="code">
|
||
# 停止服务器 (Ctrl + C)
|
||
# 然后重启
|
||
npm run dev
|
||
</div>
|
||
</div>
|
||
|
||
<div class="step">
|
||
<span class="step-number">5</span>
|
||
<strong>刷新页面</strong><br>
|
||
按 <span class="keyboard">Ctrl + F5</span>
|
||
(Mac: <span class="keyboard">Cmd + Shift + R</span>) 强制刷新
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h2>✨ 功能验证清单</h2>
|
||
<ul class="checklist">
|
||
<li>打开 AI模型系统 → AI知识库 → AI知识自动生成与应用</li>
|
||
<li>查看"知识库"Tab - 显示5条示例知识</li>
|
||
<li>查看"案例推荐"Tab - 显示3条智能推荐</li>
|
||
<li>查看"智能问答"Tab - 可以输入问题并获得回答</li>
|
||
<li>查看"统计分析"Tab - 显示图表和质量分析</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h2>💡 智能问答测试问题</h2>
|
||
<div class="tips">
|
||
<strong>在智能问答Tab中尝试以下问题:</strong><br><br>
|
||
• 番茄开花期如何灌溉?<br>
|
||
• 如何防治番茄晚疫病?<br>
|
||
• 玉米拔节期施肥方案?<br>
|
||
• 多模型融合决策如何提高准确率?
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h2>🔍 如果问题仍然存在</h2>
|
||
|
||
<div class="step">
|
||
<strong>检查开发服务器是否运行</strong><br>
|
||
确保终端中看到类似信息:
|
||
<div class="code">
|
||
VITE ready in XXX ms
|
||
Local: http://localhost:5173/
|
||
</div>
|
||
</div>
|
||
|
||
<div class="step">
|
||
<strong>检查浏览器控制台</strong><br>
|
||
• 打开 Console 标签页<br>
|
||
• 查看是否有红色错误信息<br>
|
||
• 截图错误信息以便进一步诊断
|
||
</div>
|
||
|
||
<div class="step">
|
||
<strong>尝试无痕模式</strong><br>
|
||
• Chrome: <span class="keyboard">Ctrl + Shift + N</span><br>
|
||
• Edge: <span class="keyboard">Ctrl + Shift + N</span><br>
|
||
• 在无痕窗口中打开应用测试
|
||
</div>
|
||
|
||
<div class="step">
|
||
<strong>重启浏览器</strong><br>
|
||
完全关闭所有浏览器窗口和标签页,然后重新启动
|
||
</div>
|
||
</div>
|
||
|
||
<div style="text-align: center; margin-top: 30px;">
|
||
<button class="button" onclick="location.reload(true)">
|
||
🔄 立即刷新页面
|
||
</button>
|
||
<button class="button button-success" onclick="window.close()">
|
||
✅ 完成修复
|
||
</button>
|
||
</div>
|
||
|
||
<div class="tips" style="margin-top: 30px;">
|
||
<strong>💡 提示:</strong><br>
|
||
如果执行以上所有步骤后问题仍然存在,请检查:<br>
|
||
• 防火墙设置是否阻止了本地服务器<br>
|
||
• 杀毒软件是否拦截了网络请求<br>
|
||
• 是否有代理设置影响本地连接<br>
|
||
• 端口5173是否被其他程序占用
|
||
</div>
|
||
|
||
<div style="text-align: center; margin-top: 20px; color: #999; font-size: 14px;">
|
||
更新日期: 2024-10-24 | 智慧农业生产管理系统
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|