Files
task-board/public/test.html
T
work-1 01f43d8da5 feat: v3.1 - 统一规约视图、项目树导航、移动端支持
主要更新:
- 统一规约管理视图(全局/项目规约共享表格)
- 项目树形导航(看板/项目规约子菜单)
- 智能高亮与状态持久化
- 移动端响应式支持(汉堡菜单)
- 规约类型更新为7个专业分类
- 文件清理(85→15文件,减少82%)

修复问题:
- 修复创建项目功能(JavaScript语法错误)
- 修复协作规约错误高亮
- 修复看板需要点击2次才高亮
- 修复项目树自动收起问题

新增工具:
- debug.html(项目创建测试)
- test.html(移动端测试)
- status.html(系统诊断)

技术改进:
- 上下文状态管理(currentRuleContext)
- 展开状态持久化(projectExpandedState)
- 触摸事件支持
- 移除console.log提升兼容性
2026-02-24 15:04:25 +08:00

89 lines
2.3 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>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
background: #f5f5f5;
}
.test-box {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
max-width: 600px;
margin: 50px auto;
text-align: center;
}
h1 {
color: #667eea;
}
.status {
margin: 20px 0;
padding: 15px;
background: #e7f5e7;
border-radius: 5px;
color: #2d6a2d;
}
button {
padding: 12px 24px;
background: #667eea;
color: white;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
margin: 5px;
}
button:active {
background: #5568d3;
}
</style>
</head>
<body>
<div class="test-box">
<h1>✅ 服务器正常运行</h1>
<div class="status">
<strong>状态:</strong> 连接成功<br>
<strong>时间:</strong> <span id="time"></span><br>
<strong>User-Agent:</strong> <span id="ua"></span>
</div>
<button onclick="testAPI()">测试 API</button>
<button onclick="location.href='/'">返回主页</button>
<div id="result" style="margin-top: 20px;"></div>
</div>
<script>
document.getElementById('time').textContent = new Date().toLocaleString('zh-CN');
document.getElementById('ua').textContent = navigator.userAgent;
async function testAPI() {
const result = document.getElementById('result');
result.innerHTML = '正在测试...';
try {
const response = await fetch('/api/stats');
const data = await response.json();
result.innerHTML = `
<div style="background: #e7f5e7; padding: 15px; border-radius: 5px; margin-top: 10px;">
✅ API 正常<br>
项目数: ${data.projects || 0}<br>
任务数: ${data.tasks || 0}
</div>
`;
} catch (error) {
result.innerHTML = `
<div style="background: #ffe7e7; padding: 15px; border-radius: 5px; margin-top: 10px; color: #d32f2f;">
❌ API 错误: ${error.message}
</div>
`;
}
}
</script>
</body>
</html>