Files
contract-demo/prototype/docs-index.html
D8D Developer 9cd6837935 feat: 生成资产租赁管理系统桌面端原型
- 更新为桌面端侧边栏布局
- 添加数据概览、基础信息、合同管理等页面
- 修改服务器端口为 7358
- 添加原型截图和文档数据

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-03-24 10:30:18 +00:00

52 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>文档中心</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
</head>
<body class="bg-gray-50">
<nav class="bg-white border-b sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-6 py-4 flex justify-between">
<a href="index.html" class="text-slate-600"><i class="fas fa-arrow-left"></i> 返回</a>
<h1 class="text-xl font-bold">文档中心</h1>
</div>
</nav>
<div class="flex">
<aside class="w-72 bg-white border-r min-h-screen p-6">
<h2 class="font-bold mb-4">文档列表</h2>
<div id="docList"></div>
</aside>
<main class="flex-1 p-8">
<div id="docContent" class="prose max-w-4xl"></div>
</main>
</div>
<script>
async function init() {
const listRes = await fetch('/api/docs');
const docs = await listRes.json();
document.getElementById('docList').innerHTML = docs.map(doc => `
<button onclick="loadDoc('${doc.path}')" class="w-full text-left p-3 rounded hover:bg-blue-50 mb-2">
<i class="fas fa-file-alt text-blue-500 mr-2"></i>${doc.name}
</button>
`).join('');
if (docs.length > 0) loadDoc(docs[0].path);
}
async function loadDoc(path) {
const res = await fetch('/api/doc/' + path.replace('../docs/', ''));
const data = await res.json();
if (data.success) {
document.getElementById('docContent').innerHTML = marked.parse(data.content);
}
}
init();
</script>
</body>
</html>