feat: 重构为前后端分离架构并完善设备端演示

- 新增 Web 用户端(登录体系 + 统一 REST API 调用)
- 后端增加用户认证、统一 ApiResponse、CORS 支持
- Android 设备端迁移至 MVVM + DataBinding + Retrofit 网络层
- 完善 README 架构说明与密码学原理文档
- 新增 .gitignore 与持久化数据表说明
This commit is contained in:
TongTongStudio
2026-08-21 04:34:58 +08:00
parent eda03d241d
commit 93499fa189
63 changed files with 4398 additions and 455 deletions

111
web-client/style.css Normal file
View File

@@ -0,0 +1,111 @@
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
background: #f0f4f8;
color: #1f2937;
min-height: 100vh;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 32px;
background: linear-gradient(135deg, #0f766e, #115e59);
color: #fff;
}
.topbar h1 { font-size: 20px; font-weight: 600; }
.user-info { display: flex; align-items: center; gap: 12px; }
main {
max-width: 900px;
margin: 24px auto;
padding: 0 16px;
display: flex;
flex-direction: column;
gap: 16px;
}
.panel {
background: #fff;
border-radius: 12px;
padding: 20px 24px;
box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.panel h2 {
font-size: 16px;
margin-bottom: 12px;
color: #0f766e;
border-left: 4px solid #0f766e;
padding-left: 10px;
}
.hint { font-size: 13px; color: #6b7280; margin-bottom: 14px; line-height: 1.6; }
.form-row {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 12px;
}
input {
flex: 1 1 180px;
padding: 10px 12px;
border: 1px solid #d1d5db;
border-radius: 8px;
font-size: 14px;
outline: none;
transition: border-color .15s;
}
input:focus { border-color: #0f766e; }
.btn {
padding: 10px 18px;
border: 1px solid #d1d5db;
border-radius: 8px;
background: #fff;
color: #374151;
font-size: 14px;
cursor: pointer;
transition: all .15s;
white-space: nowrap;
}
.btn:hover { border-color: #0f766e; color: #0f766e; }
.btn-primary { background: #0f766e; border-color: #0f766e; color: #fff; }
.btn-primary:hover { background: #115e59; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.result {
margin-top: 10px;
font-size: 13px;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-all;
}
.result.ok { color: #047857; }
.result.err { color: #b91c1c; }
.raw {
background: #0f172a;
color: #a5f3fc;
border-radius: 8px;
padding: 14px;
font-size: 12px;
line-height: 1.6;
overflow-x: auto;
max-height: 320px;
overflow-y: auto;
}
.hidden { display: none; }