Merge remote-tracking branch 'origin/main'

This commit is contained in:
zhouz
2026-09-07 14:26:15 +08:00
8 changed files with 1295 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,459 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<title>智能作业 PDA 首页 v6</title>
<style>
:root{
--orange:#ff6b00;--orange-soft:#fff0e6;
--blue:#587ef8;--blue-soft:#edf1ff;
--teal:#13bfa6;--teal-soft:#e8fbf7;
--rose:#f75285;--rose-soft:#fff0f5;
--ink:#253044;--muted:#8e99aa;--line:#eef1f5;--bg:#f5f7fa;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font:14px/1.45 "PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;color:var(--ink);background:#d9dee6;display:grid;place-items:center}
button{font:inherit;border:0;background:none;padding:0;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
button:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
svg{display:block}
[hidden]{display:none!important}
.stage{height:100%;width:100%;display:grid;place-items:center}
.device{position:relative;width:390px;height:844px;max-height:96vh;display:flex;flex-direction:column;background:var(--bg);border-radius:36px;overflow:hidden;box-shadow:0 18px 44px rgba(28,38,55,.28)}
.view{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}
/* ===== 首页顶部 ===== */
.hero{flex:none;padding:10px 16px 48px;color:#fff;background:linear-gradient(158deg,#ff6b00 0%,#ff7d17 58%,#ffa258 100%);border-radius:0 0 28px 28px;position:relative;overflow:hidden}
.hero::before{content:"";position:absolute;right:-70px;top:-95px;width:190px;height:190px;border-radius:50%;border:26px solid rgba(255,255,255,.10)}
.hero::after{content:"";position:absolute;left:-46px;bottom:-92px;width:150px;height:150px;border-radius:50%;background:rgba(255,255,255,.07)}
.statusbar{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;height:30px;font-size:12px;font-weight:600}
.sb-icons{display:flex;gap:5px;align-items:center}
.header-row{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;margin-top:2px}
.welcome small{display:block;margin-bottom:1px;color:#ffe3c9;font-size:12px}
.welcome strong{font-size:22px;font-weight:700}
.h-right{display:flex;align-items:center;gap:9px}
.avatar{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.22);border:1.5px solid rgba(255,255,255,.5);display:grid;place-items:center}
.avatar svg{width:19px;height:19px;color:#fff}
.logout{height:30px;padding:0 11px;border-radius:15px;border:1px solid rgba(255,255,255,.6);background:rgba(255,255,255,.12);color:#fff;font-size:12px}
.logout:active{background:rgba(255,255,255,.28)}
.search{position:relative;z-index:1;margin-top:13px;display:block}
.search>svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--orange)}
.search input{width:100%;height:44px;padding:0 14px 0 40px;border:0;border-radius:14px;background:#fff;color:var(--ink);outline:0;font-size:14px;box-shadow:0 10px 20px rgba(178,67,0,.18)}
.search input::placeholder{color:#aab3c0}
/* ===== 首页内容 ===== */
.content{position:relative;z-index:2;flex:1;min-height:0;overflow:auto;margin-top:-26px;padding:0 14px 96px;scrollbar-width:none}
.content::-webkit-scrollbar{display:none}
.section-heading{display:flex;justify-content:space-between;align-items:baseline;margin:18px 4px 10px}
.section-heading h2{margin:0;font-size:16px;font-weight:700}
.more-btn{display:flex;align-items:center;gap:3px;color:var(--orange);font-size:12px;font-weight:600}
.more-btn svg{width:12px;height:12px}
.more-btn.searching{color:var(--muted);font-weight:400;pointer-events:none}
.more-btn.searching .more-label{display:none}
.stats{display:flex;background:#fff;border-radius:18px;padding:12px 8px;box-shadow:0 4px 14px rgba(26,39,58,.05)}
.stat{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;text-align:left}
.stat+.stat{border-left:1px solid var(--line)}
.st-ic{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;flex:none}
.st-ic svg{width:17px;height:17px}
.stat b{display:block;font-size:18px;line-height:1.15}
.stat b span{font-size:11px;color:var(--muted);font-weight:400}
.stat small{color:var(--muted);font-size:11px}
.c-orange{background:var(--orange-soft);color:var(--orange)}
.c-blue{background:var(--blue-soft);color:var(--blue)}
.c-teal{background:var(--teal-soft);color:var(--teal)}
.c-rose{background:var(--rose-soft);color:var(--rose)}
.g-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.g-card{position:relative;overflow:hidden;border-radius:22px;padding:14px;color:#fff;box-shadow:0 8px 18px rgba(26,39,58,.10);text-align:left}
.g-card::after{content:"";position:absolute;right:-34px;top:-34px;width:96px;height:96px;border-radius:50%;background:rgba(255,255,255,.10)}
.g-orange{background:linear-gradient(150deg,#ff6b00,#ff8b32)}
.g-blue{background:linear-gradient(150deg,#466bf0,#7d9bff)}
.g-teal{background:linear-gradient(150deg,#0daa94,#13bfa6)}
.g-head{display:flex;align-items:center;gap:10px;position:relative;z-index:1}
.g-ic{width:36px;height:36px;border-radius:12px;background:rgba(255,255,255,.24);display:grid;place-items:center;flex:none}
.g-ic svg{width:19px;height:19px}
.g-head b{display:block;font-size:16px}
.g-head small{font-size:11px;color:rgba(255,255,255,.8)}
.chips{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:11px;position:relative;z-index:1}
.chip{height:36px;border-radius:12px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.4);color:#fff;font-size:12.5px;transition:background .12s}
.chip:active{background:rgba(255,255,255,.36)}
.chip.full{grid-column:1/-1}
.g-wide{margin-top:10px}
.g-wide .chips{display:flex}
.g-wide .chip{flex:1}
.fav-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fav{display:flex;align-items:center;gap:11px;background:#fff;border-radius:18px;padding:13px 12px;box-shadow:0 4px 14px rgba(26,39,58,.05);text-align:left;transition:transform .12s}
.fav:active{transform:scale(.97)}
.fav .tile{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;flex:none}
.fav .tile svg{width:22px;height:22px}
.fav b{display:block;font-size:15px}
.fav small{display:block;color:var(--muted);font-size:11px;margin-top:1px}
/* ===== 功能页 ===== */
.f-head{flex:none;padding:16px 16px 36px;color:#fff;background:linear-gradient(158deg,#ff6b00 0%,#ff8b32 100%);border-radius:0 0 26px 26px;position:relative;overflow:hidden}
.f-head::before{content:"";position:absolute;right:-64px;top:-88px;width:170px;height:170px;border-radius:50%;border:22px solid rgba(255,255,255,.10)}
.f-title{position:relative;z-index:1;display:flex;align-items:baseline;gap:8px}
.f-title b{font-size:18px}
.f-title small{font-size:12px;color:rgba(255,255,255,.85)}
.f-search{position:relative;z-index:1;display:block;margin-top:12px}
.f-search>svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:var(--orange)}
.f-search input{width:100%;height:42px;padding:0 14px 0 39px;border:0;border-radius:13px;background:#fff;color:var(--ink);outline:0;font-size:14px;box-shadow:0 8px 18px rgba(178,67,0,.16)}
.f-search input::placeholder{color:#aab3c0}
.tabs{flex:none;display:flex;gap:8px;padding:0 16px;margin-top:-20px;position:relative;z-index:2}
.tabs-scroll{display:flex;gap:8px;min-width:0;overflow-x:auto;padding-right:4px;scrollbar-width:none;overscroll-behavior-x:contain}
.tabs-scroll::-webkit-scrollbar{display:none}
.tab-all{flex:none}
.tab{flex:none;height:36px;padding:0 16px;border-radius:18px;background:#fff;color:#5d6a7e;font-size:13px;box-shadow:0 3px 10px rgba(26,39,58,.07);transition:background .15s,color .15s}
.tab.active{background:linear-gradient(145deg,#ff7d17,#ff6b00);color:#fff;box-shadow:0 6px 14px rgba(255,107,0,.35)}
.pager{flex:1;min-height:0;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding-top:12px;scrollbar-width:none}
.pager::-webkit-scrollbar{display:none}
.page{flex:none;width:100%;min-width:100%;scroll-snap-align:start;scroll-snap-stop:always;overflow-y:auto;padding:0 14px 96px;scrollbar-width:none;touch-action:pan-x pan-y}
.page::-webkit-scrollbar{display:none}
.sec-h{display:flex;align-items:center;gap:8px;margin:18px 4px 10px}
.sec-h:first-child{margin-top:4px}
.sec-h i{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;flex:none}
.sec-h i svg{width:15px;height:15px}
.sec-h b{font-size:15px}
.sec-h span{color:var(--muted);font-size:11px;margin-left:auto}
.item-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.item{display:flex;align-items:center;gap:11px;background:#fff;border-radius:18px;padding:13px 12px;box-shadow:0 4px 14px rgba(26,39,58,.05);text-align:left;transition:transform .12s}
.item:active{transform:scale(.97)}
.item .tile{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;flex:none}
.item .tile svg{width:21px;height:21px}
.item b{display:block;font-size:14.5px}
.item small{display:block;color:var(--muted);font-size:11px;margin-top:1px}
.item.wide{grid-column:1/-1}
.cat-head{display:flex;align-items:center;gap:11px;border-radius:20px;padding:15px 14px;color:#fff;margin-bottom:12px;position:relative;overflow:hidden}
.cat-head::after{content:"";position:absolute;right:-30px;top:-30px;width:88px;height:88px;border-radius:50%;background:rgba(255,255,255,.10)}
.cat-head .tile{width:40px;height:40px;border-radius:13px;background:rgba(255,255,255,.24);display:grid;place-items:center;flex:none;position:relative;z-index:1}
.cat-head .tile svg{width:20px;height:20px}
.cat-head .txt{position:relative;z-index:1}
.cat-head b{display:block;font-size:16px}
.cat-head small{font-size:11px;color:rgba(255,255,255,.8)}
/* ===== 我的页 ===== */
.me-head{flex:none;display:flex;align-items:center;gap:14px;padding:34px 20px 26px;color:#fff;background:linear-gradient(158deg,#ff6b00 0%,#ffa258 100%);border-radius:0 0 26px 26px;position:relative;overflow:hidden}
.me-head::before{content:"";position:absolute;right:-60px;top:-80px;width:160px;height:160px;border-radius:50%;border:22px solid rgba(255,255,255,.10)}
.m-avatar{width:56px;height:56px;border-radius:50%;background:rgba(255,255,255,.24);border:2px solid rgba(255,255,255,.55);display:grid;place-items:center;position:relative;z-index:1;flex:none}
.m-avatar svg{width:30px;height:30px;color:#fff}
.me-head .txt{position:relative;z-index:1}
.me-head b{display:block;font-size:19px}
.me-head small{font-size:12px;color:#ffe3c9}
.me-body{flex:1;min-height:0;overflow:auto;padding:16px 14px 30px;scrollbar-width:none}
.me-card{background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 5px 16px rgba(26,39,58,.05)}
.me-row{display:flex;align-items:center;gap:12px;width:100%;padding:14px;text-align:left}
.me-row+.me-row{border-top:1px solid var(--line)}
.me-row:active{background:#fafbfd}
.me-row i{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;flex:none}
.me-row i svg{width:18px;height:18px}
.me-row span{flex:1;font-size:14.5px}
.me-row .chev{width:15px;height:15px;color:#c3cbd6}
.me-logout{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:46px;margin-top:14px;border-radius:16px;background:#fff4ec;color:var(--orange);font-size:15px;font-weight:600}
.me-logout svg{width:18px;height:18px}
/* ===== 底部 Dock ===== */
.dock{position:absolute;left:50%;transform:translateX(-50%);bottom:14px;display:flex;align-items:flex-end;gap:26px;background:#fff;border-radius:30px;padding:7px 18px 6px;box-shadow:0 10px 26px rgba(28,38,55,.20);z-index:8}
.dock-item{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:10px;color:#98a2b3;width:44px}
.dock-item svg{width:20px;height:20px}
.dock-item.active{color:var(--orange)}
.dock-mid{display:flex;flex-direction:column;align-items:center;width:56px}
.dock-mid .circle{width:50px;height:50px;border-radius:50%;background:linear-gradient(145deg,#ff7d17,#ff6b00);color:#fff;display:grid;place-items:center;margin-top:-26px;box-shadow:0 8px 18px rgba(255,107,0,.42);transition:transform .12s}
.dock-mid .circle svg{width:23px;height:23px}
.dock-mid span{font-size:10px;color:#98a2b3;margin-top:2px}
.dock-mid.active span{color:var(--orange)}
.dock-mid.active .circle{box-shadow:0 0 0 5px rgba(255,107,0,.16),0 8px 18px rgba(255,107,0,.42)}
/* 提示与空状态 */
.toast{position:absolute;z-index:20;top:150px;left:50%;transform:translate(-50%,-8px);padding:10px 15px;border-radius:11px;background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.18);font-size:13px;white-space:nowrap;opacity:0;pointer-events:none;transition:.22s}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast b{color:var(--teal);margin-right:5px}
.empty{display:none;padding:42px 12px;text-align:center;color:var(--muted);font-size:13px}
.footer{text-align:center;color:#b7c0cc;font-size:11px;margin:16px 0 4px}
.view>*{animation:fadeUp .38s ease both}
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media(max-width:410px){.device{width:100%;height:100%;max-height:none;border-radius:0;box-shadow:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style>
</head>
<body>
<div class="stage">
<main class="device">
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
<symbol id="i-in" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v10"/><path d="m8 9 4 4 4-4"/><path d="M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"/></symbol>
<symbol id="i-out" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 13V3"/><path d="m8 7 4-4 4 4"/><path d="M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"/></symbol>
<symbol id="i-receive" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 8 4.5v9L12 21l-8-4.5v-9z"/><path d="m4.5 7.5 7.5 4 7.5-4"/><path d="M12 11.5V21"/></symbol>
<symbol id="i-agv" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 6.5h11v9.5h-11z"/><path d="M13.5 9.5h4.2l3.3 3.3v3.2h-7.5z"/><circle cx="7" cy="18.8" r="1.9"/><circle cx="17.2" cy="18.8" r="1.9"/></symbol>
<symbol id="i-handin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="7.5" r="3.4"/><path d="M5 20.2c.9-3.7 3.7-5.7 7-5.7s6.1 2 7 5.7"/></symbol>
<symbol id="i-shelf" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M4.5 4.5h15"/><path d="M4.5 12h15"/><path d="M4.5 19.5h15"/><path d="M7.5 4.5v15"/><path d="M13 4.5v15"/><path d="M18.5 4.5v15"/></symbol>
<symbol id="i-order" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="6.5" y="4" width="11" height="16.5" rx="2.2"/><path d="M9.2 4V2.8A1.8 1.8 0 0 1 11 1h2a1.8 1.8 0 0 1 1.8 1.8V4"/><path d="M9.3 10.5h5.4"/><path d="M9.3 14.5h5.4"/></symbol>
<symbol id="i-pick" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 8.5h17l-1.9 10a2.2 2.2 0 0 1-2.2 1.8H7.6a2.2 2.2 0 0 1-2.2-1.8z"/><path d="M9 8.5a3 3 0 0 1 6 0"/></symbol>
<symbol id="i-boxout" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 8 4.5v9L12 21l-8-4.5v-9z"/><path d="m4.5 7.5 7.5 4 7.5-4"/><path d="M12 11.5V21"/><path d="M12 15.5v-4"/><path d="m10 13.5 2-2 2 2"/></symbol>
<symbol id="i-pin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 21.5s-7.2-5.6-7.2-11.2a7.2 7.2 0 0 1 14.4 0C19.2 15.9 12 21.5 12 21.5z"/><circle cx="12" cy="10.3" r="2.7"/></symbol>
<symbol id="i-pinsearch" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 21.5s-7.2-5.6-7.2-11.2a7.2 7.2 0 0 1 14.4 0C19.2 15.9 12 21.5 12 21.5z"/><circle cx="12" cy="10.3" r="2.7"/><path d="m15.6 13.9 3.4 3.4"/></symbol>
<symbol id="i-link" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13.2a4.8 4.8 0 0 0 7.2.5l2.9-2.9a4.8 4.8 0 0 0-6.8-6.8l-1.6 1.6"/><path d="M14 10.8a4.8 4.8 0 0 0-7.2-.5l-2.9 2.9a4.8 4.8 0 0 0 6.8 6.8l1.6-1.6"/></symbol>
<symbol id="i-unlock" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="10.5" width="14" height="10" rx="2.2"/><path d="M8.2 10.5V7.2a3.8 3.8 0 0 1 7.5-.8"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 5 6.1v4.7c0 4.6 3 8.2 7 10.2 4-2 7-5.6 7-10.2V6.1z"/><path d="m9.2 11.8 2 2 3.8-3.9"/></symbol>
<symbol id="i-boxin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 8 4.5v9L12 21l-8-4.5v-9z"/><path d="m4.5 7.5 7.5 4 7.5-4"/><path d="M12 11.5V21"/><path d="M12 8.5v4"/><path d="m10 10.5 2 2 2-2"/></symbol>
<symbol id="i-db" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5.5" rx="8" ry="3"/><path d="M4 5.5v13c0 1.7 3.6 3 8 3s8-1.3 8-3v-13"/><path d="M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/></symbol>
<symbol id="i-scale" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z"/><path d="m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z"/><path d="M7 21h10"/><path d="M12 3v18"/><path d="M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2"/></symbol>
<symbol id="i-barcode" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M4 5v14"/><path d="M8 5v14"/><path d="M12 5v14" stroke-width="3.2"/><path d="M16 5v14"/><path d="M20 5v14"/></symbol>
<symbol id="i-layers" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3.5 8.5 4.7L12 12.9 3.5 8.2z"/><path d="m3.5 12.8 8.5 4.7 8.5-4.7"/></symbol>
<symbol id="i-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><circle cx="11" cy="11" r="6.3"/><path d="m15.7 15.7 4.3 4.3"/></symbol>
<symbol id="i-scan" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M4 8.5V5.8A1.8 1.8 0 0 1 5.8 4h2.7"/><path d="M15.5 4h2.7A1.8 1.8 0 0 1 20 5.8v2.7"/><path d="M20 15.5v2.7a1.8 1.8 0 0 1-1.8 1.8h-2.7"/><path d="M8.5 20H5.8A1.8 1.8 0 0 1 4 18.2v-2.7"/><path d="M7.5 12h9"/></symbol>
<symbol id="i-chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9.5 6.5 5.5 5.5-5.5 5.5"/></symbol>
<symbol id="i-user" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="3.4"/><path d="M5 20.2c.9-3.7 3.7-5.7 7-5.7s6.1 2 7 5.7"/></symbol>
<symbol id="i-home" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m4 11 8-7 8 7"/><path d="M6 10v9h12v-9"/></symbol>
<symbol id="i-grid" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="6.5" height="6.5" rx="1.6"/><rect x="13.5" y="4" width="6.5" height="6.5" rx="1.6"/><rect x="4" y="13.5" width="6.5" height="6.5" rx="1.6"/><rect x="13.5" y="13.5" width="6.5" height="6.5" rx="1.6"/></symbol>
<symbol id="i-direct" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="m12 8 4 4-4 4"/><path d="M8 12h8"/></symbol>
<symbol id="i-bell" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9.5a6 6 0 0 1 12 0c0 4 1.5 5.5 1.5 5.5h-15S6 13.5 6 9.5z"/><path d="M10 18.5a2.2 2.2 0 0 0 4 0"/></symbol>
<symbol id="i-refresh" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M20 12a8 8 0 1 1-2.4-5.7"/><path d="M20 4.5v4h-4"/></symbol>
<symbol id="i-info" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="M12 11v5"/><path d="M12 7.8v.2"/></symbol>
<symbol id="i-logout" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 4H6.8A1.8 1.8 0 0 0 5 5.8v12.4A1.8 1.8 0 0 0 6.8 20h2.7"/><path d="m15 8 4 4-4 4"/><path d="M19 12H9.5"/></symbol>
</svg>
<!-- ===== 首页 ===== -->
<section class="view" id="homeView">
<header class="hero">
<div class="statusbar">
<span>09:41</span>
<span class="sb-icons">
<svg width="16" height="12" viewBox="0 0 16 12" fill="#fff"><path d="M1 8h2.2v3H1z"/><path d="M5 5.5h2.2V11H5z"/><path d="M9 3h2.2v8H9z"/><path d="M13 .5h2.2V11H13z"/></svg>
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" stroke="#fff" stroke-width="1.6" stroke-linecap="round"><path d="M1.5 4.5a10 10 0 0 1 13 0"/><path d="M4 7a6 6 0 0 1 8 0"/><path d="M6.6 9.4a3 3 0 0 1 2.8 0"/><circle cx="8" cy="11" r=".9" fill="#fff" stroke="none"/></svg>
<svg width="20" height="12" viewBox="0 0 20 12" fill="none"><rect x=".8" y="1.2" width="15.6" height="9.6" rx="2.2" stroke="#fff" stroke-width="1.2" opacity=".85"/><rect x="2.8" y="3.2" width="9.5" height="5.6" rx="1" fill="#fff"/><path d="M18.2 4.4v3.2" stroke="#fff" stroke-width="1.6" stroke-linecap="round"/></svg>
</span>
</div>
<div class="header-row">
<div class="welcome"><small>智能作业中心 · 8月27日</small><strong>你好,admin</strong></div>
<div class="h-right">
<i class="avatar"><svg><use href="#i-user"/></svg></i>
<button class="logout" id="logoutBtn">退出</button>
</div>
</div>
<label class="search">
<svg><use href="#i-search"/></svg>
<input id="searchInput" placeholder="搜索功能页面" autocomplete="off">
</label>
</header>
<div class="content">
<div class="stats" id="stats">
<button class="stat" data-stat="今日收货"><i class="st-ic c-orange"><svg><use href="#i-receive"/></svg></i><span><b>36<span> 托</span></b><small>今日收货</small></span></button>
<button class="stat" data-stat="今日出库"><i class="st-ic c-blue"><svg><use href="#i-boxout"/></svg></i><span><b>21<span> 托</span></b><small>今日出库</small></span></button>
<button class="stat" data-stat="待质检"><i class="st-ic c-teal"><svg><use href="#i-check"/></svg></i><span><b>5<span> 卷</span></b><small>待质检</small></span></button>
</div>
<div class="section-heading" id="secWorkHead">
<h2>作业入口</h2>
<button class="more-btn" id="moreBtn"><span id="count">共 17 项功能</span><span class="more-label"> · 查看更多 <svg><use href="#i-chev"/></svg></span></button>
</div>
<div class="g-row" id="secWork"></div>
<div id="wideCard"></div>
<div class="section-heading" id="secFavHead"><h2>常用功能</h2><span class="fav-hint" style="color:var(--muted);font-size:12px">高频作业</span></div>
<div class="fav-grid" id="secFav"></div>
<div class="empty" id="homeEmpty">没有找到匹配的功能</div>
<p class="footer">数据为权限演示数据 · 智能作业系统 v6.0</p>
</div>
</section>
<!-- ===== 功能页 ===== -->
<section class="view" id="funcView" hidden>
<header class="f-head">
<div class="f-title"><b>全部功能</b><small id="fCount"></small></div>
<label class="f-search">
<svg><use href="#i-search"/></svg>
<input id="fSearch" placeholder="搜索功能页面" autocomplete="off">
</label>
</header>
<div class="tabs" id="tabs"><button class="tab tab-all active" id="tabAll" data-id="all">全部</button><div class="tabs-scroll" id="tabsScroll"></div></div>
<div class="pager" id="pager"></div>
</section>
<!-- ===== 我的页 ===== -->
<section class="view" id="meView" hidden>
<header class="me-head">
<i class="m-avatar"><svg><use href="#i-user"/></svg></i>
<div class="txt"><b>admin</b><small>智能作业用户 · 工号 NL001</small></div>
</header>
<div class="me-body">
<div class="me-card">
<button class="me-row" data-toast="消息通知(原型演示)"><i class="c-orange"><svg><use href="#i-bell"/></svg></i><span>消息通知</span><svg class="chev"><use href="#i-chev"/></svg></button>
<button class="me-row" data-toast="检查更新(原型演示)"><i class="c-blue"><svg><use href="#i-refresh"/></svg></i><span>检查更新</span><svg class="chev"><use href="#i-chev"/></svg></button>
<button class="me-row" data-toast="关于系统(原型演示)"><i class="c-teal"><svg><use href="#i-info"/></svg></i><span>关于系统</span><svg class="chev"><use href="#i-chev"/></svg></button>
</div>
<button class="me-logout" id="meLogout"><svg><use href="#i-logout"/></svg>退出登录</button>
</div>
</section>
<nav class="dock" aria-label="底部导航">
<button class="dock-item active" id="tabHome"><svg><use href="#i-home"/></svg><span>首页</span></button>
<button class="dock-mid" id="tabFunc"><i class="circle"><svg><use href="#i-grid"/></svg></i><span>全部功能</span></button>
<button class="dock-item" id="tabMe"><svg><use href="#i-user"/></svg><span>我的</span></button>
</nav>
<div class="toast" id="toast"><b>✓</b><span id="toastText"></span></div>
</main>
</div>
<script>
const $=id=>document.getElementById(id);
// 模拟后端按当前用户权限返回的二级菜单;一级目录数量和名称均可变化。
const GROUPS=[
{id:'inbound',icon:'i-in',name:'入库',grad:'g-orange',color:'c-orange',subs:[
{icon:'i-receive',name:'收货组盘',desc:'扫码组盘收货'},{icon:'i-agv',name:'AGV 入库',desc:'自动搬运入库'},{icon:'i-handin',name:'手工入库',desc:'手动登记入库'},{icon:'i-shelf',name:'平码上架',desc:'上架至平码库位'}]},
{id:'outbound',icon:'i-out',name:'出库',grad:'g-blue',color:'c-blue',subs:[
{icon:'i-order',name:'按单出库',desc:'按订单拣配出库'},{icon:'i-pick',name:'拣货下架',desc:'扫描拣货下架'},{icon:'i-boxout',name:'装箱出库',desc:'装箱扫码出库'}]},
{id:'quality',icon:'i-check',name:'质量作业',grad:'g-teal',color:'c-teal',subs:[
{icon:'i-check',name:'子卷质检',desc:'子卷快速质检'},{icon:'i-order',name:'质检复核',desc:'复核质检结果'},{icon:'i-unlock',name:'不合格处理',desc:'异常质量处置'}]},
{id:'inventory',icon:'i-db',name:'库存维护',grad:'g-blue',color:'c-blue',subs:[
{icon:'i-db',name:'管芯库存维护',desc:'维护管芯库存'},{icon:'i-scale',name:'子卷重量维护',desc:'维护称重信息'},{icon:'i-search',name:'库存查询',desc:'查询实时库存'}]},
{id:'packing',icon:'i-layers',name:'装箱作业',grad:'g-orange',color:'c-orange',subs:[
{icon:'i-layers',name:'绑定包装关系',desc:'建立装箱关联'},{icon:'i-boxin',name:'装箱入库',desc:'整箱确认入库'},{icon:'i-barcode',name:'三码合一',desc:'标签关系校验'}]},
{id:'agv',icon:'i-agv',name:'生产物流',grad:'g-teal',color:'c-teal',subs:[
{icon:'i-agv',name:'呼叫 AGV',desc:'发起生产叫车'},{icon:'i-receive',name:'线边补料',desc:'配送生产物料'},{icon:'i-out',name:'空托回收',desc:'回收空托盘'},{icon:'i-check',name:'配送确认',desc:'确认送达站点'}]},
{id:'base',icon:'i-pin',name:'基础维护',grad:'g-blue',color:'c-blue',subs:[
{icon:'i-link',name:'库位绑定/解绑',desc:'管理库位关系'},{icon:'i-pinsearch',name:'装箱区点位管理',desc:'管理点位状态'},{icon:'i-search',name:'站点信息查询',desc:'查询生产站点'}]}
];
const FAVS=[GROUPS[5].subs[0],GROUPS[1].subs[0],GROUPS[2].subs[0],GROUPS[4].subs[1]];
FAVS[0].color='c-rose';FAVS[1].color='c-blue';FAVS[2].color='c-teal';FAVS[3].color='c-orange';
const total=GROUPS.reduce((n,g)=>n+g.subs.length,0);
/* 首页渲染 */
$('secWork').innerHTML=GROUPS.slice(0,2).map(g=>`
<div class="g-card ${g.grad}" data-name="${g.name}">
<div class="g-head"><i class="g-ic"><svg><use href="#${g.icon}"/></svg></i><span><b>${g.name}</b><small>${g.subs.length} 项功能</small></span></div>
<div class="chips">${g.subs.map((s,i)=>`<button class="chip leaf${i===g.subs.length-1&&g.subs.length%2?' full':''}" data-name="${s.name}">${s.name}</button>`).join('')}</div>
</div>`).join('');
const third=GROUPS[5];
$('wideCard').innerHTML=`
<div class="g-card ${third.grad} g-wide" data-name="${third.name}">
<div class="g-head"><i class="g-ic"><svg><use href="#${third.icon}"/></svg></i><span><b>${third.name}</b><small>${third.subs.length} 项功能</small></span></div>
<div class="chips">${third.subs.map(s=>`<button class="chip leaf" data-name="${s.name}">${s.name}</button>`).join('')}</div>
</div>`;
$('secFav').innerHTML=FAVS.map(f=>`
<button class="fav leaf" data-name="${f.name}">
<i class="tile ${f.color}"><svg><use href="#${f.icon}"/></svg></i>
<span><b>${f.name}</b><small>${f.desc}</small></span>
</button>`).join('');
$('count').textContent=`共 ${total} 项功能`;
const itemCard=(icon,color,name,desc,wide)=>`
<button class="item leaf${wide?' wide':''}" data-name="${name}">
<i class="tile ${color}"><svg><use href="#${icon}"/></svg></i>
<span><b>${name}</b><small>${desc}</small></span>
</button>`;
/* 功能页:固定“全部”,其余一级目录由权限数据动态生成并横向滑动。 */
$('tabsScroll').innerHTML=GROUPS.map(g=>`<button class="tab" data-id="${g.id}">${g.name}</button>`).join('');
let activeCategory='all';
function categoryBlock(g,asCategory=false,key=''){
const groupMatch=g.name.toLowerCase().includes(key);
const items=g.subs.filter(s=>!key||groupMatch||s.name.toLowerCase().includes(key)||s.desc.toLowerCase().includes(key));
if(!items.length)return{html:'',count:0};
const title=asCategory?`<div class="cat-head ${g.grad}"><i class="tile"><svg><use href="#${g.icon}"/></svg></i><span class="txt"><b>${g.name}</b><small>${g.subs.length} 项子功能 · 左右滑动切换目录</small></span></div>`:`<div class="sec-h"><i class="${g.color}"><svg><use href="#${g.icon}"/></svg></i><b>${g.name}</b><span>${items.length} 项</span></div>`;
return{count:items.length,html:`<section class="fsec" data-name="${g.name}">${title}<div class="item-grid">${items.map((s,i)=>itemCard(s.icon,g.color,s.name,s.desc,items.length%2===1&&i===items.length-1)).join('')}</div></section>`};
}
function renderFunctionPages(keyword=''){
const key=keyword.trim().toLowerCase();let shown=0;
const allBlocks=GROUPS.map(g=>{const block=categoryBlock(g,false,key);shown+=block.count;return block.html}).join('');
const allPage=`<div class="page" id="pageAll">${allBlocks}<div class="empty" id="fEmpty" style="display:${shown?'none':'block'}">没有找到匹配的功能</div><p class="footer">${shown?`显示 ${shown} 项授权功能`:'请更换搜索条件'}</p></div>`;
const categoryPages=key?'':GROUPS.map(g=>`<div class="page" data-category="${g.id}">${categoryBlock(g,true).html}<p class="footer">${g.subs.length} 项功能 · 左右滑动换页</p></div>`).join('');
$('pager').innerHTML=allPage+categoryPages;
$('fCount').textContent=key?`找到 ${shown} 项`:`${total} 项授权功能`;
}
renderFunctionPages();
/* 视图切换 */
const views={home:$('homeView'),func:$('funcView'),me:$('meView')};
const dockMap={home:$('tabHome'),func:$('tabFunc'),me:$('tabMe')};
function showView(name){
Object.keys(views).forEach(k=>{views[k].hidden=k!==name});
Object.keys(dockMap).forEach(k=>dockMap[k].classList.toggle('active',k===name));
}
$('tabHome').onclick=()=>showView('home');
$('tabMe').onclick=()=>showView('me');
$('tabFunc').onclick=()=>{resetFuncSearch();showView('func')};
$('moreBtn').onclick=()=>{resetFuncSearch();showView('func')};
$('logoutBtn').onclick=()=>toast('退出登录(原型演示)');
$('meLogout').onclick=()=>toast('退出登录(原型演示)');
/* 功能页:点击目录或左右滑动内容都能换页,并同步当前一级目录。 */
const pager=$('pager');
function setActiveCategory(index){
activeCategory=index===0?'all':GROUPS[index-1].id;
$('tabAll').classList.toggle('active',index===0);
document.querySelectorAll('#tabsScroll .tab').forEach((t,i)=>t.classList.toggle('active',i===index-1));
}
function slideTo(index){
const start=pager.scrollLeft,dist=index*pager.clientWidth-start;
const t0=performance.now(),duration=260;
const timer=setInterval(()=>{const p=Math.min((performance.now()-t0)/duration,1);pager.scrollLeft=start+dist*(1-Math.pow(1-p,3));if(p>=1)clearInterval(timer)},16);
}
$('tabAll').onclick=()=>{if($('fSearch').value){$('fSearch').value='';renderFunctionPages()}setActiveCategory(0);slideTo(0)};
$('tabsScroll').onclick=e=>{const tab=e.target.closest('.tab');if(!tab)return;if($('fSearch').value){$('fSearch').value='';renderFunctionPages()}const index=GROUPS.findIndex(g=>g.id===tab.dataset.id)+1;setActiveCategory(index);slideTo(index)};
let swipeSyncTimer;
pager.addEventListener('scroll',()=>{clearTimeout(swipeSyncTimer);swipeSyncTimer=setTimeout(()=>{if(!$('fSearch').value)setActiveCategory(Math.round(pager.scrollLeft/pager.clientWidth))},70)},{passive:true});
function resetFuncSearch(){$('fSearch').value='';renderFunctionPages();pager.scrollLeft=0;setActiveCategory(0)}
$('fSearch').addEventListener('input',e=>{renderFunctionPages(e.target.value);pager.scrollLeft=0;setActiveCategory(0)});
/* 首页搜索 */
$('searchInput').addEventListener('input',e=>{
const key=e.target.value.trim().toLowerCase();
let shown=0;
document.querySelectorAll('#secWork .g-card, #wideCard .g-card').forEach(card=>{
const leaves=[...card.querySelectorAll('.leaf')];
if(!key){
card.style.display='';
leaves.forEach(l=>l.style.display='');
shown+=leaves.length;
return;
}
const title=card.dataset.name.toLowerCase();
let leafShown=0;
leaves.forEach(l=>{
const m=l.dataset.name.toLowerCase().includes(key);
l.style.display=m?'':'none';
if(m)leafShown++;
});
if(title.includes(key)){
leaves.forEach(l=>l.style.display='');
card.style.display='';
shown+=leaves.length;
}else if(leafShown){
card.style.display='';
shown+=leafShown;
}else{
card.style.display='none';
}
});
document.querySelectorAll('#secFav .fav').forEach(t=>{
if(!key){t.style.display='';return}
const m=t.dataset.name.toLowerCase().includes(key);
t.style.display=m?'':'none';
if(m)shown++;
});
const secVis=sel=>[...document.querySelectorAll(sel)].some(el=>el.style.display!=='none');
$('secWork').style.display=secVis('#secWork .g-card')?'':'none';
$('secWorkHead').style.display=secVis('#secWork .g-card, #wideCard .g-card')?'':'none';
$('wideCard').style.display=$('wideCard').querySelector('.g-card').style.display!=='none'?'':'none';
$('secFav').style.display=secVis('#secFav .fav')?'':'none';
$('secFavHead').style.display=secVis('#secFav .fav')?'':'none';
$('stats').style.display=key?'none':'';
$('count').textContent=key?`找到 ${shown} 项`:`共 ${total} 项功能`;
$('moreBtn').classList.toggle('searching',!!key);
$('homeEmpty').style.display=shown?'none':'block';
});
/* 点击行为 */
document.addEventListener('click',e=>{
const leaf=e.target.closest('.leaf');
if(leaf){toast(`进入“${leaf.dataset.name}”`);return}
const stat=e.target.closest('.stat');
if(stat){toast(`查看${stat.dataset.stat}明细(原型演示)`);return}
const row=e.target.closest('.me-row');
if(row){toast(row.dataset.toast);return}
});
let toastTimer;
function toast(text){
$('toastText').textContent=text;
$('toast').classList.add('show');
clearTimeout(toastTimer);
toastTimer=setTimeout(()=>$('toast').classList.remove('show'),1600);
}
</script>
</body>
</html>

View File

@@ -0,0 +1,477 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<title>智能作业 PDA 首页 v7</title>
<style>
:root{
--orange:#ff6b00;--orange-soft:#fff0e6;
--blue:#587ef8;--blue-soft:#edf1ff;
--teal:#13bfa6;--teal-soft:#e8fbf7;
--rose:#f75285;--rose-soft:#fff0f5;
--ink:#253044;--muted:#8e99aa;--line:#eef1f5;--bg:#f5f7fa;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font:14px/1.45 "PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;color:var(--ink);background:#d9dee6;display:grid;place-items:center}
button{font:inherit;border:0;background:none;padding:0;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
button:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
svg{display:block}
[hidden]{display:none!important}
.stage{height:100%;width:100%;display:grid;place-items:center}
.device{position:relative;width:390px;height:844px;max-height:96vh;display:flex;flex-direction:column;background:var(--bg);border-radius:36px;overflow:hidden;box-shadow:0 18px 44px rgba(28,38,55,.28)}
.view{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}
/* ===== 首页顶部 ===== */
.hero{flex:none;padding:10px 16px 48px;color:#fff;background:linear-gradient(158deg,#ff6b00 0%,#ff7d17 58%,#ffa258 100%);border-radius:0 0 28px 28px;position:relative;overflow:hidden}
.hero::before{content:"";position:absolute;right:-70px;top:-95px;width:190px;height:190px;border-radius:50%;border:26px solid rgba(255,255,255,.10)}
.hero::after{content:"";position:absolute;left:-46px;bottom:-92px;width:150px;height:150px;border-radius:50%;background:rgba(255,255,255,.07)}
.statusbar{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;height:30px;font-size:12px;font-weight:600}
.sb-icons{display:flex;gap:5px;align-items:center}
.header-row{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;margin-top:2px}
.welcome small{display:block;margin-bottom:1px;color:#ffe3c9;font-size:12px}
.welcome strong{font-size:22px;font-weight:700}
.h-right{display:flex;align-items:center;gap:9px}
.avatar{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.22);border:1.5px solid rgba(255,255,255,.5);display:grid;place-items:center}
.avatar svg{width:19px;height:19px;color:#fff}
.logout{height:30px;padding:0 11px;border-radius:15px;border:1px solid rgba(255,255,255,.6);background:rgba(255,255,255,.12);color:#fff;font-size:12px}
.logout:active{background:rgba(255,255,255,.28)}
.search{position:relative;z-index:1;margin-top:13px;display:block}
.search>svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--orange)}
.search input{width:100%;height:44px;padding:0 14px 0 40px;border:0;border-radius:14px;background:#fff;color:var(--ink);outline:0;font-size:14px;box-shadow:0 10px 20px rgba(178,67,0,.18)}
.search input::placeholder{color:#aab3c0}
/* ===== 首页内容 ===== */
.content{position:relative;z-index:2;flex:1;min-height:0;overflow:auto;margin-top:-26px;padding:0 14px 96px;scrollbar-width:none}
.content::-webkit-scrollbar{display:none}
.section-heading{display:flex;justify-content:space-between;align-items:baseline;margin:18px 4px 10px}
.section-heading h2{margin:0;font-size:16px;font-weight:700}
.more-btn{display:flex;align-items:center;gap:3px;color:var(--orange);font-size:12px;font-weight:600}
.more-btn svg{width:12px;height:12px}
.more-btn.searching{color:var(--muted);font-weight:400;pointer-events:none}
.more-btn.searching .more-label{display:none}
.stats{display:flex;background:#fff;border-radius:18px;padding:12px 8px;box-shadow:0 4px 14px rgba(26,39,58,.05)}
.stat{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;text-align:left}
.stat+.stat{border-left:1px solid var(--line)}
.st-ic{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;flex:none}
.st-ic svg{width:17px;height:17px}
.stat b{display:block;font-size:18px;line-height:1.15}
.stat b span{font-size:11px;color:var(--muted);font-weight:400}
.stat small{color:var(--muted);font-size:11px}
.c-orange{background:var(--orange-soft);color:var(--orange)}
.c-blue{background:var(--blue-soft);color:var(--blue)}
.c-teal{background:var(--teal-soft);color:var(--teal)}
.c-rose{background:var(--rose-soft);color:var(--rose)}
.g-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.g-card{position:relative;overflow:hidden;border-radius:22px;padding:14px;color:#fff;box-shadow:0 8px 18px rgba(26,39,58,.10);text-align:left}
.g-card::after{content:"";position:absolute;right:-34px;top:-34px;width:96px;height:96px;border-radius:50%;background:rgba(255,255,255,.10)}
.g-orange{background:linear-gradient(150deg,#ff6b00,#ff8b32)}
.g-blue{background:linear-gradient(150deg,#466bf0,#7d9bff)}
.g-teal{background:linear-gradient(150deg,#0daa94,#13bfa6)}
.g-head{display:flex;align-items:center;gap:10px;position:relative;z-index:1}
.g-ic{width:36px;height:36px;border-radius:12px;background:rgba(255,255,255,.24);display:grid;place-items:center;flex:none}
.g-ic svg{width:19px;height:19px}
.g-head b{display:block;font-size:16px}
.g-head small{font-size:11px;color:rgba(255,255,255,.8)}
.chips{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:11px;position:relative;z-index:1}
.chip{height:36px;border-radius:12px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.4);color:#fff;font-size:12.5px;transition:background .12s}
.chip:active{background:rgba(255,255,255,.36)}
.chip.full{grid-column:1/-1}
.g-wide{margin-top:10px}
.g-wide .chips{display:flex}
.g-wide .chip{flex:1}
.fav-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fav{display:flex;align-items:center;gap:11px;background:#fff;border-radius:18px;padding:13px 12px;box-shadow:0 4px 14px rgba(26,39,58,.05);text-align:left;transition:transform .12s}
.fav:active{transform:scale(.97)}
.fav .tile{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;flex:none}
.fav .tile svg{width:22px;height:22px}
.fav b{display:block;font-size:15px}
.fav small{display:block;color:var(--muted);font-size:11px;margin-top:1px}
/* ===== 版本更新 ===== */
.update-card{position:relative;overflow:hidden;background:linear-gradient(145deg,#fff 0%,#fff8f2 100%);border:1px solid #ffe4cf;border-radius:20px;padding:14px;box-shadow:0 5px 16px rgba(80,49,25,.06)}
.update-card::after{content:"";position:absolute;right:-34px;top:-42px;width:104px;height:104px;border-radius:50%;background:rgba(255,107,0,.06)}
.update-top{position:relative;z-index:1;display:flex;align-items:center;gap:11px}
.update-icon{width:42px;height:42px;display:grid;place-items:center;flex:none;border-radius:14px;background:var(--orange-soft);color:var(--orange)}
.update-icon svg{width:22px;height:22px}
.update-main{flex:1;min-width:0}.update-main b{display:block;font-size:15px}.update-main small{display:block;margin-top:2px;color:var(--muted);font-size:11px}
.version-badge{flex:none;padding:4px 8px;border-radius:12px;background:#e8fbf7;color:#0b9b83;font-size:10px;font-style:normal;font-weight:600}
.update-summary{position:relative;z-index:1;margin:12px 0 0;padding:10px 11px;border-radius:13px;background:rgba(255,255,255,.84);color:#677387;font-size:12px}
.update-summary b{color:var(--ink)}
.update-detail{position:relative;z-index:1;margin:10px 0 0;padding:0;list-style:none;color:#667286;font-size:12px}
.update-detail li{position:relative;padding:5px 4px 5px 17px;border-top:1px dashed #f1ded0}
.update-detail li::before{content:"";position:absolute;left:4px;top:11px;width:5px;height:5px;border-radius:50%;background:var(--orange)}
.update-toggle{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:4px;width:100%;height:32px;margin-top:7px;color:var(--orange);font-size:12px;font-weight:600}
.update-toggle svg{width:13px;height:13px;transition:transform .2s}.update-toggle.open svg{transform:rotate(90deg)}
/* ===== 功能页 ===== */
.f-head{flex:none;padding:16px 16px 36px;color:#fff;background:linear-gradient(158deg,#ff6b00 0%,#ff8b32 100%);border-radius:0 0 26px 26px;position:relative;overflow:hidden}
.f-head::before{content:"";position:absolute;right:-64px;top:-88px;width:170px;height:170px;border-radius:50%;border:22px solid rgba(255,255,255,.10)}
.f-title{position:relative;z-index:1;display:flex;align-items:baseline;gap:8px}
.f-title b{font-size:18px}
.f-title small{font-size:12px;color:rgba(255,255,255,.85)}
.f-search{position:relative;z-index:1;display:block;margin-top:12px}
.f-search>svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:var(--orange)}
.f-search input{width:100%;height:42px;padding:0 14px 0 39px;border:0;border-radius:13px;background:#fff;color:var(--ink);outline:0;font-size:14px;box-shadow:0 8px 18px rgba(178,67,0,.16)}
.f-search input::placeholder{color:#aab3c0}
.tabs{flex:none;display:flex;gap:8px;padding:0 16px;margin-top:-20px;position:relative;z-index:2}
.tabs-scroll{display:flex;gap:8px;min-width:0;overflow-x:auto;padding-right:4px;scrollbar-width:none;overscroll-behavior-x:contain}
.tabs-scroll::-webkit-scrollbar{display:none}
.tab-all{flex:none}
.tab{flex:none;height:36px;padding:0 16px;border-radius:18px;background:#fff;color:#5d6a7e;font-size:13px;box-shadow:0 3px 10px rgba(26,39,58,.07);transition:background .15s,color .15s}
.tab.active{background:linear-gradient(145deg,#ff7d17,#ff6b00);color:#fff;box-shadow:0 6px 14px rgba(255,107,0,.35)}
.pager{flex:1;min-height:0;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding-top:12px;scrollbar-width:none}
.pager::-webkit-scrollbar{display:none}
.page{flex:none;width:100%;min-width:100%;scroll-snap-align:start;scroll-snap-stop:always;overflow-y:auto;padding:0 14px 96px;scrollbar-width:none;touch-action:pan-x pan-y}
.page::-webkit-scrollbar{display:none}
.sec-h{display:flex;align-items:center;gap:8px;margin:18px 4px 10px}
.sec-h:first-child{margin-top:4px}
.sec-h i{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;flex:none}
.sec-h i svg{width:15px;height:15px}
.sec-h b{font-size:15px}
.sec-h span{color:var(--muted);font-size:11px;margin-left:auto}
.item-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.item{display:flex;align-items:center;gap:11px;background:#fff;border-radius:18px;padding:13px 12px;box-shadow:0 4px 14px rgba(26,39,58,.05);text-align:left;transition:transform .12s}
.item:active{transform:scale(.97)}
.item .tile{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;flex:none}
.item .tile svg{width:21px;height:21px}
.item b{display:block;font-size:14.5px}
.item small{display:block;color:var(--muted);font-size:11px;margin-top:1px}
.item.wide{grid-column:1/-1}
.cat-head{display:flex;align-items:center;gap:11px;border-radius:20px;padding:15px 14px;color:#fff;margin-bottom:12px;position:relative;overflow:hidden}
.cat-head::after{content:"";position:absolute;right:-30px;top:-30px;width:88px;height:88px;border-radius:50%;background:rgba(255,255,255,.10)}
.cat-head .tile{width:40px;height:40px;border-radius:13px;background:rgba(255,255,255,.24);display:grid;place-items:center;flex:none;position:relative;z-index:1}
.cat-head .tile svg{width:20px;height:20px}
.cat-head .txt{position:relative;z-index:1}
.cat-head b{display:block;font-size:16px}
.cat-head small{font-size:11px;color:rgba(255,255,255,.8)}
/* ===== 我的页 ===== */
.me-head{flex:none;display:flex;align-items:center;gap:14px;padding:34px 20px 26px;color:#fff;background:linear-gradient(158deg,#ff6b00 0%,#ffa258 100%);border-radius:0 0 26px 26px;position:relative;overflow:hidden}
.me-head::before{content:"";position:absolute;right:-60px;top:-80px;width:160px;height:160px;border-radius:50%;border:22px solid rgba(255,255,255,.10)}
.m-avatar{width:56px;height:56px;border-radius:50%;background:rgba(255,255,255,.24);border:2px solid rgba(255,255,255,.55);display:grid;place-items:center;position:relative;z-index:1;flex:none}
.m-avatar svg{width:30px;height:30px;color:#fff}
.me-head .txt{position:relative;z-index:1}
.me-head b{display:block;font-size:19px}
.me-head small{font-size:12px;color:#ffe3c9}
.me-body{flex:1;min-height:0;overflow:auto;padding:16px 14px 30px;scrollbar-width:none}
.me-card{background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 5px 16px rgba(26,39,58,.05)}
.me-row{display:flex;align-items:center;gap:12px;width:100%;padding:14px;text-align:left}
.me-row+.me-row{border-top:1px solid var(--line)}
.me-row:active{background:#fafbfd}
.me-row i{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;flex:none}
.me-row i svg{width:18px;height:18px}
.me-row span{flex:1;font-size:14.5px}
.me-row .chev{width:15px;height:15px;color:#c3cbd6}
.me-logout{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:46px;margin-top:14px;border-radius:16px;background:#fff4ec;color:var(--orange);font-size:15px;font-weight:600}
.me-logout svg{width:18px;height:18px}
/* ===== 底部 Dock ===== */
.dock{position:absolute;left:50%;transform:translateX(-50%);bottom:14px;display:flex;align-items:flex-end;gap:26px;background:#fff;border-radius:30px;padding:7px 18px 6px;box-shadow:0 10px 26px rgba(28,38,55,.20);z-index:8}
.dock-item{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:10px;color:#98a2b3;width:44px}
.dock-item svg{width:20px;height:20px}
.dock-item.active{color:var(--orange)}
.dock-mid{display:flex;flex-direction:column;align-items:center;width:56px}
.dock-mid .circle{width:50px;height:50px;border-radius:50%;background:linear-gradient(145deg,#ff7d17,#ff6b00);color:#fff;display:grid;place-items:center;margin-top:-26px;box-shadow:0 8px 18px rgba(255,107,0,.42);transition:transform .12s}
.dock-mid .circle svg{width:23px;height:23px}
.dock-mid span{font-size:10px;color:#98a2b3;margin-top:2px}
.dock-mid.active span{color:var(--orange)}
.dock-mid.active .circle{box-shadow:0 0 0 5px rgba(255,107,0,.16),0 8px 18px rgba(255,107,0,.42)}
/* 提示与空状态 */
.toast{position:absolute;z-index:20;top:150px;left:50%;transform:translate(-50%,-8px);padding:10px 15px;border-radius:11px;background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.18);font-size:13px;white-space:nowrap;opacity:0;pointer-events:none;transition:.22s}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast b{color:var(--teal);margin-right:5px}
.empty{display:none;padding:42px 12px;text-align:center;color:var(--muted);font-size:13px}
.footer{text-align:center;color:#b7c0cc;font-size:11px;margin:16px 0 4px}
.view>*{animation:fadeUp .38s ease both}
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media(max-width:410px){.device{width:100%;height:100%;max-height:none;border-radius:0;box-shadow:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style>
</head>
<body>
<div class="stage">
<main class="device">
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
<symbol id="i-in" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v10"/><path d="m8 9 4 4 4-4"/><path d="M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"/></symbol>
<symbol id="i-out" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 13V3"/><path d="m8 7 4-4 4 4"/><path d="M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"/></symbol>
<symbol id="i-receive" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 8 4.5v9L12 21l-8-4.5v-9z"/><path d="m4.5 7.5 7.5 4 7.5-4"/><path d="M12 11.5V21"/></symbol>
<symbol id="i-agv" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 6.5h11v9.5h-11z"/><path d="M13.5 9.5h4.2l3.3 3.3v3.2h-7.5z"/><circle cx="7" cy="18.8" r="1.9"/><circle cx="17.2" cy="18.8" r="1.9"/></symbol>
<symbol id="i-handin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="7.5" r="3.4"/><path d="M5 20.2c.9-3.7 3.7-5.7 7-5.7s6.1 2 7 5.7"/></symbol>
<symbol id="i-shelf" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M4.5 4.5h15"/><path d="M4.5 12h15"/><path d="M4.5 19.5h15"/><path d="M7.5 4.5v15"/><path d="M13 4.5v15"/><path d="M18.5 4.5v15"/></symbol>
<symbol id="i-order" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="6.5" y="4" width="11" height="16.5" rx="2.2"/><path d="M9.2 4V2.8A1.8 1.8 0 0 1 11 1h2a1.8 1.8 0 0 1 1.8 1.8V4"/><path d="M9.3 10.5h5.4"/><path d="M9.3 14.5h5.4"/></symbol>
<symbol id="i-pick" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 8.5h17l-1.9 10a2.2 2.2 0 0 1-2.2 1.8H7.6a2.2 2.2 0 0 1-2.2-1.8z"/><path d="M9 8.5a3 3 0 0 1 6 0"/></symbol>
<symbol id="i-boxout" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 8 4.5v9L12 21l-8-4.5v-9z"/><path d="m4.5 7.5 7.5 4 7.5-4"/><path d="M12 11.5V21"/><path d="M12 15.5v-4"/><path d="m10 13.5 2-2 2 2"/></symbol>
<symbol id="i-pin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 21.5s-7.2-5.6-7.2-11.2a7.2 7.2 0 0 1 14.4 0C19.2 15.9 12 21.5 12 21.5z"/><circle cx="12" cy="10.3" r="2.7"/></symbol>
<symbol id="i-pinsearch" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 21.5s-7.2-5.6-7.2-11.2a7.2 7.2 0 0 1 14.4 0C19.2 15.9 12 21.5 12 21.5z"/><circle cx="12" cy="10.3" r="2.7"/><path d="m15.6 13.9 3.4 3.4"/></symbol>
<symbol id="i-link" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13.2a4.8 4.8 0 0 0 7.2.5l2.9-2.9a4.8 4.8 0 0 0-6.8-6.8l-1.6 1.6"/><path d="M14 10.8a4.8 4.8 0 0 0-7.2-.5l-2.9 2.9a4.8 4.8 0 0 0 6.8 6.8l1.6-1.6"/></symbol>
<symbol id="i-unlock" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="10.5" width="14" height="10" rx="2.2"/><path d="M8.2 10.5V7.2a3.8 3.8 0 0 1 7.5-.8"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 5 6.1v4.7c0 4.6 3 8.2 7 10.2 4-2 7-5.6 7-10.2V6.1z"/><path d="m9.2 11.8 2 2 3.8-3.9"/></symbol>
<symbol id="i-boxin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 8 4.5v9L12 21l-8-4.5v-9z"/><path d="m4.5 7.5 7.5 4 7.5-4"/><path d="M12 11.5V21"/><path d="M12 8.5v4"/><path d="m10 10.5 2 2 2-2"/></symbol>
<symbol id="i-db" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5.5" rx="8" ry="3"/><path d="M4 5.5v13c0 1.7 3.6 3 8 3s8-1.3 8-3v-13"/><path d="M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/></symbol>
<symbol id="i-scale" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z"/><path d="m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z"/><path d="M7 21h10"/><path d="M12 3v18"/><path d="M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2"/></symbol>
<symbol id="i-barcode" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M4 5v14"/><path d="M8 5v14"/><path d="M12 5v14" stroke-width="3.2"/><path d="M16 5v14"/><path d="M20 5v14"/></symbol>
<symbol id="i-layers" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3.5 8.5 4.7L12 12.9 3.5 8.2z"/><path d="m3.5 12.8 8.5 4.7 8.5-4.7"/></symbol>
<symbol id="i-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><circle cx="11" cy="11" r="6.3"/><path d="m15.7 15.7 4.3 4.3"/></symbol>
<symbol id="i-scan" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M4 8.5V5.8A1.8 1.8 0 0 1 5.8 4h2.7"/><path d="M15.5 4h2.7A1.8 1.8 0 0 1 20 5.8v2.7"/><path d="M20 15.5v2.7a1.8 1.8 0 0 1-1.8 1.8h-2.7"/><path d="M8.5 20H5.8A1.8 1.8 0 0 1 4 18.2v-2.7"/><path d="M7.5 12h9"/></symbol>
<symbol id="i-chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9.5 6.5 5.5 5.5-5.5 5.5"/></symbol>
<symbol id="i-user" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="3.4"/><path d="M5 20.2c.9-3.7 3.7-5.7 7-5.7s6.1 2 7 5.7"/></symbol>
<symbol id="i-home" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m4 11 8-7 8 7"/><path d="M6 10v9h12v-9"/></symbol>
<symbol id="i-grid" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="6.5" height="6.5" rx="1.6"/><rect x="13.5" y="4" width="6.5" height="6.5" rx="1.6"/><rect x="4" y="13.5" width="6.5" height="6.5" rx="1.6"/><rect x="13.5" y="13.5" width="6.5" height="6.5" rx="1.6"/></symbol>
<symbol id="i-direct" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="m12 8 4 4-4 4"/><path d="M8 12h8"/></symbol>
<symbol id="i-bell" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9.5a6 6 0 0 1 12 0c0 4 1.5 5.5 1.5 5.5h-15S6 13.5 6 9.5z"/><path d="M10 18.5a2.2 2.2 0 0 0 4 0"/></symbol>
<symbol id="i-refresh" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M20 12a8 8 0 1 1-2.4-5.7"/><path d="M20 4.5v4h-4"/></symbol>
<symbol id="i-info" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="M12 11v5"/><path d="M12 7.8v.2"/></symbol>
<symbol id="i-logout" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 4H6.8A1.8 1.8 0 0 0 5 5.8v12.4A1.8 1.8 0 0 0 6.8 20h2.7"/><path d="m15 8 4 4-4 4"/><path d="M19 12H9.5"/></symbol>
</svg>
<!-- ===== 首页 ===== -->
<section class="view" id="homeView">
<header class="hero">
<div class="statusbar">
<span>09:41</span>
<span class="sb-icons">
<svg width="16" height="12" viewBox="0 0 16 12" fill="#fff"><path d="M1 8h2.2v3H1z"/><path d="M5 5.5h2.2V11H5z"/><path d="M9 3h2.2v8H9z"/><path d="M13 .5h2.2V11H13z"/></svg>
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" stroke="#fff" stroke-width="1.6" stroke-linecap="round"><path d="M1.5 4.5a10 10 0 0 1 13 0"/><path d="M4 7a6 6 0 0 1 8 0"/><path d="M6.6 9.4a3 3 0 0 1 2.8 0"/><circle cx="8" cy="11" r=".9" fill="#fff" stroke="none"/></svg>
<svg width="20" height="12" viewBox="0 0 20 12" fill="none"><rect x=".8" y="1.2" width="15.6" height="9.6" rx="2.2" stroke="#fff" stroke-width="1.2" opacity=".85"/><rect x="2.8" y="3.2" width="9.5" height="5.6" rx="1" fill="#fff"/><path d="M18.2 4.4v3.2" stroke="#fff" stroke-width="1.6" stroke-linecap="round"/></svg>
</span>
</div>
<div class="header-row">
<div class="welcome"><small>智能作业中心 · 8月27日</small><strong>你好,admin</strong></div>
<div class="h-right">
<i class="avatar"><svg><use href="#i-user"/></svg></i>
<button class="logout" id="logoutBtn">退出</button>
</div>
</div>
<label class="search">
<svg><use href="#i-search"/></svg>
<input id="searchInput" placeholder="搜索功能页面" autocomplete="off">
</label>
</header>
<div class="content">
<div class="stats" id="stats">
<button class="stat" data-stat="今日收货"><i class="st-ic c-orange"><svg><use href="#i-receive"/></svg></i><span><b>36<span> 托</span></b><small>今日收货</small></span></button>
<button class="stat" data-stat="今日出库"><i class="st-ic c-blue"><svg><use href="#i-boxout"/></svg></i><span><b>21<span> 托</span></b><small>今日出库</small></span></button>
<button class="stat" data-stat="待质检"><i class="st-ic c-teal"><svg><use href="#i-check"/></svg></i><span><b>5<span> 卷</span></b><small>待质检</small></span></button>
</div>
<div class="section-heading" id="secWorkHead">
<h2>作业入口</h2>
<button class="more-btn" id="moreBtn"><span id="count">共 17 项功能</span><span class="more-label"> · 查看更多 <svg><use href="#i-chev"/></svg></span></button>
</div>
<div class="g-row" id="secWork"></div>
<div class="section-heading" id="secFavHead"><h2>常用功能</h2><span class="fav-hint" style="color:var(--muted);font-size:12px">高频作业</span></div>
<div class="fav-grid" id="secFav"></div>
<section id="updateSection">
<div class="section-heading"><h2>版本更新</h2><span style="color:var(--muted);font-size:12px">最近一次更新</span></div>
<article class="update-card">
<div class="update-top"><i class="update-icon"><svg><use href="#i-refresh"/></svg></i><span class="update-main"><b>手持版本 v2.4.0</b><small>更新于 2026-08-29 08:30</small></span><em class="version-badge">已是最新</em></div>
<p class="update-summary"><b>本次更新:</b>优化智能作业首页,新增生产物流与权限菜单能力。</p>
<ul class="update-detail" id="updateDetail" hidden><li>新增生产呼叫 AGV、线边补料和配送确认入口</li><li>全部功能支持按用户权限动态加载一级目录</li><li>优化功能分类横向滑动、页面切换和扫码响应速度</li></ul>
<button class="update-toggle" id="updateToggle" aria-expanded="false">展开更新详情 <svg><use href="#i-chev"/></svg></button>
</article>
</section>
<div class="empty" id="homeEmpty">没有找到匹配的功能</div>
<p class="footer">数据为权限演示数据 · 智能作业系统 v7.0</p>
</div>
</section>
<!-- ===== 功能页 ===== -->
<section class="view" id="funcView" hidden>
<header class="f-head">
<div class="f-title"><b>全部功能</b><small id="fCount"></small></div>
<label class="f-search">
<svg><use href="#i-search"/></svg>
<input id="fSearch" placeholder="搜索功能页面" autocomplete="off">
</label>
</header>
<div class="tabs" id="tabs"><button class="tab tab-all active" id="tabAll" data-id="all">全部</button><div class="tabs-scroll" id="tabsScroll"></div></div>
<div class="pager" id="pager"></div>
</section>
<!-- ===== 我的页 ===== -->
<section class="view" id="meView" hidden>
<header class="me-head">
<i class="m-avatar"><svg><use href="#i-user"/></svg></i>
<div class="txt"><b>admin</b><small>智能作业用户 · 工号 NL001</small></div>
</header>
<div class="me-body">
<div class="me-card">
<button class="me-row" data-toast="消息通知(原型演示)"><i class="c-orange"><svg><use href="#i-bell"/></svg></i><span>消息通知</span><svg class="chev"><use href="#i-chev"/></svg></button>
<button class="me-row" data-toast="检查更新(原型演示)"><i class="c-blue"><svg><use href="#i-refresh"/></svg></i><span>检查更新</span><svg class="chev"><use href="#i-chev"/></svg></button>
<button class="me-row" data-toast="关于系统(原型演示)"><i class="c-teal"><svg><use href="#i-info"/></svg></i><span>关于系统</span><svg class="chev"><use href="#i-chev"/></svg></button>
</div>
<button class="me-logout" id="meLogout"><svg><use href="#i-logout"/></svg>退出登录</button>
</div>
</section>
<nav class="dock" aria-label="底部导航">
<button class="dock-item active" id="tabHome"><svg><use href="#i-home"/></svg><span>首页</span></button>
<button class="dock-mid" id="tabFunc"><i class="circle"><svg><use href="#i-grid"/></svg></i><span>全部功能</span></button>
<button class="dock-item" id="tabMe"><svg><use href="#i-user"/></svg><span>我的</span></button>
</nav>
<div class="toast" id="toast"><b>✓</b><span id="toastText"></span></div>
</main>
</div>
<script>
const $=id=>document.getElementById(id);
// 模拟后端按当前用户权限返回的二级菜单;一级目录数量和名称均可变化。
const GROUPS=[
{id:'inbound',icon:'i-in',name:'入库',grad:'g-orange',color:'c-orange',subs:[
{icon:'i-receive',name:'收货组盘',desc:'扫码组盘收货'},{icon:'i-agv',name:'AGV 入库',desc:'自动搬运入库'},{icon:'i-handin',name:'手工入库',desc:'手动登记入库'},{icon:'i-shelf',name:'平码上架',desc:'上架至平码库位'}]},
{id:'outbound',icon:'i-out',name:'出库',grad:'g-blue',color:'c-blue',subs:[
{icon:'i-order',name:'按单出库',desc:'按订单拣配出库'},{icon:'i-pick',name:'拣货下架',desc:'扫描拣货下架'},{icon:'i-boxout',name:'装箱出库',desc:'装箱扫码出库'}]},
{id:'quality',icon:'i-check',name:'质量作业',grad:'g-teal',color:'c-teal',subs:[
{icon:'i-check',name:'子卷质检',desc:'子卷快速质检'},{icon:'i-order',name:'质检复核',desc:'复核质检结果'},{icon:'i-unlock',name:'不合格处理',desc:'异常质量处置'}]},
{id:'inventory',icon:'i-db',name:'库存维护',grad:'g-blue',color:'c-blue',subs:[
{icon:'i-db',name:'管芯库存维护',desc:'维护管芯库存'},{icon:'i-scale',name:'子卷重量维护',desc:'维护称重信息'},{icon:'i-search',name:'库存查询',desc:'查询实时库存'}]},
{id:'packing',icon:'i-layers',name:'装箱作业',grad:'g-orange',color:'c-orange',subs:[
{icon:'i-layers',name:'绑定包装关系',desc:'建立装箱关联'},{icon:'i-boxin',name:'装箱入库',desc:'整箱确认入库'},{icon:'i-barcode',name:'三码合一',desc:'标签关系校验'}]},
{id:'agv',icon:'i-agv',name:'生产物流',grad:'g-teal',color:'c-teal',subs:[
{icon:'i-agv',name:'呼叫 AGV',desc:'发起生产叫车'},{icon:'i-receive',name:'线边补料',desc:'配送生产物料'},{icon:'i-out',name:'空托回收',desc:'回收空托盘'},{icon:'i-check',name:'配送确认',desc:'确认送达站点'}]},
{id:'base',icon:'i-pin',name:'基础维护',grad:'g-blue',color:'c-blue',subs:[
{icon:'i-link',name:'库位绑定/解绑',desc:'管理库位关系'},{icon:'i-pinsearch',name:'装箱区点位管理',desc:'管理点位状态'},{icon:'i-search',name:'站点信息查询',desc:'查询生产站点'}]}
];
const FAVS=[GROUPS[5].subs[0],GROUPS[1].subs[0],GROUPS[2].subs[0],GROUPS[4].subs[1]];
FAVS[0].color='c-rose';FAVS[1].color='c-blue';FAVS[2].color='c-teal';FAVS[3].color='c-orange';
const total=GROUPS.reduce((n,g)=>n+g.subs.length,0);
/* 首页渲染 */
$('secWork').innerHTML=GROUPS.slice(0,2).map(g=>`
<div class="g-card ${g.grad}" data-name="${g.name}">
<div class="g-head"><i class="g-ic"><svg><use href="#${g.icon}"/></svg></i><span><b>${g.name}</b><small>${g.subs.length} 项功能</small></span></div>
<div class="chips">${g.subs.map((s,i)=>`<button class="chip leaf${i===g.subs.length-1&&g.subs.length%2?' full':''}" data-name="${s.name}">${s.name}</button>`).join('')}</div>
</div>`).join('');
$('secFav').innerHTML=FAVS.map(f=>`
<button class="fav leaf" data-name="${f.name}">
<i class="tile ${f.color}"><svg><use href="#${f.icon}"/></svg></i>
<span><b>${f.name}</b><small>${f.desc}</small></span>
</button>`).join('');
$('count').textContent=`共 ${total} 项功能`;
const itemCard=(icon,color,name,desc,wide)=>`
<button class="item leaf${wide?' wide':''}" data-name="${name}">
<i class="tile ${color}"><svg><use href="#${icon}"/></svg></i>
<span><b>${name}</b><small>${desc}</small></span>
</button>`;
/* 功能页:固定“全部”,其余一级目录由权限数据动态生成并横向滑动。 */
$('tabsScroll').innerHTML=GROUPS.map(g=>`<button class="tab" data-id="${g.id}">${g.name}</button>`).join('');
let activeCategory='all';
function categoryBlock(g,asCategory=false,key=''){
const groupMatch=g.name.toLowerCase().includes(key);
const items=g.subs.filter(s=>!key||groupMatch||s.name.toLowerCase().includes(key)||s.desc.toLowerCase().includes(key));
if(!items.length)return{html:'',count:0};
const title=asCategory?`<div class="cat-head ${g.grad}"><i class="tile"><svg><use href="#${g.icon}"/></svg></i><span class="txt"><b>${g.name}</b><small>${g.subs.length} 项子功能 · 左右滑动切换目录</small></span></div>`:`<div class="sec-h"><i class="${g.color}"><svg><use href="#${g.icon}"/></svg></i><b>${g.name}</b><span>${items.length} 项</span></div>`;
return{count:items.length,html:`<section class="fsec" data-name="${g.name}">${title}<div class="item-grid">${items.map((s,i)=>itemCard(s.icon,g.color,s.name,s.desc,items.length%2===1&&i===items.length-1)).join('')}</div></section>`};
}
function renderFunctionPages(keyword=''){
const key=keyword.trim().toLowerCase();let shown=0;
const allBlocks=GROUPS.map(g=>{const block=categoryBlock(g,false,key);shown+=block.count;return block.html}).join('');
const allPage=`<div class="page" id="pageAll">${allBlocks}<div class="empty" id="fEmpty" style="display:${shown?'none':'block'}">没有找到匹配的功能</div><p class="footer">${shown?`显示 ${shown} 项授权功能`:'请更换搜索条件'}</p></div>`;
const categoryPages=key?'':GROUPS.map(g=>`<div class="page" data-category="${g.id}">${categoryBlock(g,true).html}<p class="footer">${g.subs.length} 项功能 · 左右滑动换页</p></div>`).join('');
$('pager').innerHTML=allPage+categoryPages;
$('fCount').textContent=key?`找到 ${shown} 项`:`${total} 项授权功能`;
}
renderFunctionPages();
/* 视图切换 */
const views={home:$('homeView'),func:$('funcView'),me:$('meView')};
const dockMap={home:$('tabHome'),func:$('tabFunc'),me:$('tabMe')};
function showView(name){
Object.keys(views).forEach(k=>{views[k].hidden=k!==name});
Object.keys(dockMap).forEach(k=>dockMap[k].classList.toggle('active',k===name));
}
$('tabHome').onclick=()=>showView('home');
$('tabMe').onclick=()=>showView('me');
$('tabFunc').onclick=()=>{resetFuncSearch();showView('func')};
$('moreBtn').onclick=()=>{resetFuncSearch();showView('func')};
$('logoutBtn').onclick=()=>toast('退出登录(原型演示)');
$('meLogout').onclick=()=>toast('退出登录(原型演示)');
$('updateToggle').onclick=()=>{const detail=$('updateDetail'),open=detail.hidden;detail.hidden=!open;$('updateToggle').classList.toggle('open',open);$('updateToggle').setAttribute('aria-expanded',String(open));$('updateToggle').childNodes[0].nodeValue=open?'收起更新详情 ':'展开更新详情 '};
/* 功能页:点击目录或左右滑动内容都能换页,并同步当前一级目录。 */
const pager=$('pager');
function setActiveCategory(index){
activeCategory=index===0?'all':GROUPS[index-1].id;
$('tabAll').classList.toggle('active',index===0);
document.querySelectorAll('#tabsScroll .tab').forEach((t,i)=>t.classList.toggle('active',i===index-1));
}
function slideTo(index){
const start=pager.scrollLeft,dist=index*pager.clientWidth-start;
const t0=performance.now(),duration=260;
const timer=setInterval(()=>{const p=Math.min((performance.now()-t0)/duration,1);pager.scrollLeft=start+dist*(1-Math.pow(1-p,3));if(p>=1)clearInterval(timer)},16);
}
$('tabAll').onclick=()=>{if($('fSearch').value){$('fSearch').value='';renderFunctionPages()}setActiveCategory(0);slideTo(0)};
$('tabsScroll').onclick=e=>{const tab=e.target.closest('.tab');if(!tab)return;if($('fSearch').value){$('fSearch').value='';renderFunctionPages()}const index=GROUPS.findIndex(g=>g.id===tab.dataset.id)+1;setActiveCategory(index);slideTo(index)};
let swipeSyncTimer;
pager.addEventListener('scroll',()=>{clearTimeout(swipeSyncTimer);swipeSyncTimer=setTimeout(()=>{if(!$('fSearch').value)setActiveCategory(Math.round(pager.scrollLeft/pager.clientWidth))},70)},{passive:true});
function resetFuncSearch(){$('fSearch').value='';renderFunctionPages();pager.scrollLeft=0;setActiveCategory(0)}
$('fSearch').addEventListener('input',e=>{renderFunctionPages(e.target.value);pager.scrollLeft=0;setActiveCategory(0)});
/* 首页搜索 */
$('searchInput').addEventListener('input',e=>{
const key=e.target.value.trim().toLowerCase();
let shown=0;
document.querySelectorAll('#secWork .g-card').forEach(card=>{
const leaves=[...card.querySelectorAll('.leaf')];
if(!key){
card.style.display='';
leaves.forEach(l=>l.style.display='');
shown+=leaves.length;
return;
}
const title=card.dataset.name.toLowerCase();
let leafShown=0;
leaves.forEach(l=>{
const m=l.dataset.name.toLowerCase().includes(key);
l.style.display=m?'':'none';
if(m)leafShown++;
});
if(title.includes(key)){
leaves.forEach(l=>l.style.display='');
card.style.display='';
shown+=leaves.length;
}else if(leafShown){
card.style.display='';
shown+=leafShown;
}else{
card.style.display='none';
}
});
document.querySelectorAll('#secFav .fav').forEach(t=>{
if(!key){t.style.display='';return}
const m=t.dataset.name.toLowerCase().includes(key);
t.style.display=m?'':'none';
if(m)shown++;
});
const secVis=sel=>[...document.querySelectorAll(sel)].some(el=>el.style.display!=='none');
$('secWork').style.display=secVis('#secWork .g-card')?'':'none';
$('secWorkHead').style.display=secVis('#secWork .g-card')?'':'none';
$('secFav').style.display=secVis('#secFav .fav')?'':'none';
$('secFavHead').style.display=secVis('#secFav .fav')?'':'none';
$('updateSection').style.display=key?'none':'';
$('stats').style.display=key?'none':'';
$('count').textContent=key?`找到 ${shown} 项`:`共 ${total} 项功能`;
$('moreBtn').classList.toggle('searching',!!key);
$('homeEmpty').style.display=shown?'none':'block';
});
/* 点击行为 */
document.addEventListener('click',e=>{
const leaf=e.target.closest('.leaf');
if(leaf){toast(`进入“${leaf.dataset.name}”`);return}
const stat=e.target.closest('.stat');
if(stat){toast(`查看${stat.dataset.stat}明细(原型演示)`);return}
const row=e.target.closest('.me-row');
if(row){toast(row.dataset.toast);return}
});
let toastTimer;
function toast(text){
$('toastText').textContent=text;
$('toast').classList.add('show');
clearTimeout(toastTimer);
toastTimer=setTimeout(()=>$('toast').classList.remove('show'),1600);
}
</script>
</body>
</html>