- backend/:Egg 3 纯 JSON 接口服务(MySQL 8 + Redis),全部走 header 令牌鉴权; 已彻底去掉服务端渲染(删除 page 控制器 / app/view / nunjucks / session / CSRF), 开发时把页面请求反代到前端 dev server,生产托管 frontend/dist(SPA 回退)。 单测 91 个通过(不需要本机数据库)。 - frontend/:Vite + Vue3 + TypeScript 的 SPA(登录 / 注册 / 找回密码 / 扫码登录与确认 / 首页统计 / 设备管理 / 扫码记录 / 个人中心 / 测试页),vue-tsc 类型检查与构建通过。 - extension/:MV3 浏览器扩展(零构建),注入第三方 WMS 页面识别运单号并打开溯源页。 - 忽略规则统一放根 .gitignore:node_modules、dist、logs / logs-*、run、typings、 .env*、config.local.js(含本机数据库与 Redis 密码,绝不入库)。
132 lines
3.1 KiB
CSS
132 lines
3.1 KiB
CSS
:root {
|
|
--bg: #f6f8fa;
|
|
--fg: #1f2328;
|
|
--muted: #6b7280;
|
|
--border: #d9dee5;
|
|
--brand: #0b7d7c;
|
|
--brand-2: #0ea5a4;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
width: 336px;
|
|
margin: 0;
|
|
padding: 10px 10px 12px;
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
font: 13px/1.5 "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
|
|
}
|
|
|
|
header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 2px 2px 10px;
|
|
}
|
|
.logo { width: 24px; height: 24px; flex: none; }
|
|
.title { flex: 1 1 auto; min-width: 0; }
|
|
h1 { margin: 0; font-size: 13px; font-weight: 600; }
|
|
.muted { color: var(--muted); }
|
|
#host {
|
|
margin: 0;
|
|
font-size: 11px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.card {
|
|
background: #fff;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.card .row { display: flex; align-items: center; gap: 6px; font-size: 12px; }
|
|
.card .row.head { justify-content: space-between; color: var(--muted); }
|
|
.card .row.head b { color: var(--fg); font-size: 13px; }
|
|
.card .row + .row { margin-top: 4px; }
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 0 6px;
|
|
border-radius: 999px;
|
|
font-size: 11px;
|
|
line-height: 18px;
|
|
}
|
|
.badge.ok { background: #e6f7f6; color: var(--brand); }
|
|
.badge.warn { background: #fff4e5; color: #b45309; }
|
|
.badge.off { background: #eef0f3; color: var(--muted); }
|
|
|
|
.list {
|
|
list-style: none;
|
|
margin: 6px 0 0;
|
|
padding: 0;
|
|
max-height: 190px;
|
|
overflow-y: auto;
|
|
}
|
|
.list li {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 4px 6px;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
}
|
|
.list li:hover { background: #eef6f6; }
|
|
.list li .code {
|
|
font-family: Consolas, "Courier New", monospace;
|
|
font-size: 12px;
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.list li .rule { color: var(--muted); font-size: 10px; flex: none; }
|
|
|
|
.empty { margin: 6px 0 0; font-size: 12px; }
|
|
|
|
.actions { display: flex; gap: 8px; }
|
|
button {
|
|
flex: 1 1 0;
|
|
padding: 7px 8px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
background: #fff;
|
|
color: var(--fg);
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
}
|
|
button:hover { border-color: var(--brand-2); color: var(--brand); }
|
|
button.primary {
|
|
background: var(--brand);
|
|
border-color: var(--brand);
|
|
color: #fff;
|
|
}
|
|
button.primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
|
|
|
|
/* 开关 */
|
|
.sw { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
|
|
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
|
|
.sw span {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: #cbd5e1;
|
|
border-radius: 999px;
|
|
transition: background .15s ease;
|
|
}
|
|
.sw span::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 2px; left: 2px;
|
|
width: 16px; height: 16px;
|
|
background: #fff;
|
|
border-radius: 50%;
|
|
transition: transform .15s ease;
|
|
}
|
|
.sw input:checked + span { background: var(--brand-2); }
|
|
.sw input:checked + span::after { transform: translateX(16px); }
|
|
.sw input:focus-visible + span { box-shadow: 0 0 0 2px rgba(14,165,164,.4); }
|