From 7bf5d8c2b65f3138d3314fc1273ee8dbd3302c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=BD=E5=B7=A5=E5=91=98?= <4846a27a-ba87-49c9-939d-7275f63efcc7@agents.multica.local> Date: Mon, 24 Aug 2026 08:47:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(HEL-70):=20=E6=89=8B=E6=9C=BA=E7=AB=AF=20P?= =?UTF-8?q?1=20=E5=9B=9B=E5=A4=A7=E5=9B=BE=E6=A0=87=E9=A1=B5=EF=BC=88?= =?UTF-8?q?=E8=A1=8C=E6=83=85/=E5=B7=A5=E5=85=B7/=E5=A4=8D=E7=9B=98/?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: multica-agent --- app/frontend/m/config/nav.config.js | 50 ++++++++++++++----------- app/frontend/m/css/shell.css | 58 +++++++++++++++++++++++++++++ app/frontend/m/js/router.js | 53 ++++++++++++++++++++++++-- app/frontend/m/js/session.js | 6 ++- 4 files changed, 140 insertions(+), 27 deletions(-) diff --git a/app/frontend/m/config/nav.config.js b/app/frontend/m/config/nav.config.js index 5691c59..f5f3d6e 100644 --- a/app/frontend/m/config/nav.config.js +++ b/app/frontend/m/config/nav.config.js @@ -4,50 +4,56 @@ const nav = { entries: [ { key: "market", title: "行情数据", subtitle: "情绪 · 梯队 · 题材 · 龙虎榜", icon: "bar-chart-3" }, - { key: "tools", title: "智能工具", subtitle: "智能选股 · 问师", icon: "wand-2" }, - { key: "review", title: "我的复盘", subtitle: "复盘日志 · 交易记录", icon: "notebook-pen" }, + { key: "tools", title: "智能工具", subtitle: "智能选股 · 策略跟踪 · 问师", icon: "wand-2" }, + { key: "review", title: "我的复盘", subtitle: "自选 · 交易 · 复盘 · 笔记 · 提醒", icon: "notebook-pen" }, { key: "assistant", title: "复盘助手", subtitle: "AI 对话复盘", icon: "message-square" }, - { key: "system", title: "系统管理", subtitle: "外观主题 · 数据管理 · 关于", icon: "settings" } + { key: "system", title: "系统管理", subtitle: "账号 · 密码 · 会员 · 设置", icon: "settings" } ], hubs: { market: { title: "行情数据", items: [ - { key: "market/sentiment", label: "情绪周期" }, - { key: "market/limit-up", label: "涨停池" }, - { key: "market/broken", label: "炸板池" }, - { key: "market/limit-down", label: "跌停池" }, - { key: "market/yesterday", label: "昨日涨停" }, - { key: "market/performance", label: "涨停表现" }, - { key: "market/ladder", label: "市场天梯" }, - { key: "market/rotation", label: "主题轮动" }, - { key: "market/auction", label: "竞价" }, - { key: "market/themes", label: "题材库" }, - { key: "market/popularity", label: "人气榜" }, - { key: "market/dragon", label: "龙虎榜" } + { key: "market/sentiment", label: "情绪周期", icon: "activity" }, + { key: "market/limit-up", label: "涨停池", icon: "trending-up" }, + { key: "market/broken", label: "炸板池", icon: "zap" }, + { key: "market/limit-down", label: "跌停池", icon: "trending-down" }, + { key: "market/yesterday", label: "昨日涨停", icon: "history" }, + { key: "market/performance", label: "涨停表现", icon: "chart-line" }, + { key: "market/ladder", label: "市场天梯", icon: "layers" }, + { key: "market/rotation", label: "主题轮动", icon: "refresh-cw" }, + { key: "market/auction", label: "竞价", icon: "gavel" }, + { key: "market/themes", label: "题材库", icon: "book-open" }, + { key: "market/popularity", label: "人气榜", icon: "flame" }, + { key: "market/dragon", label: "龙虎榜", icon: "crown" } ] }, tools: { title: "智能工具", items: [ - { key: "tools/screener", label: "智能选股" }, - { key: "tools/mentor", label: "问师" } + { key: "tools/screener", label: "智能选股", icon: "filter" }, + { key: "tools/tracking", label: "策略跟踪", icon: "target" }, + { key: "tools/mentor", label: "问师", icon: "bot" } ] }, review: { title: "我的复盘", items: [ - { key: "review/journal", label: "复盘日志" }, - { key: "review/trades", label: "交易记录" } + { key: "review/watchlist", label: "自选股", icon: "star" }, + { key: "review/trades", label: "交易日志", icon: "scroll-text" }, + { key: "review/daily", label: "每日复盘", icon: "calendar-check" }, + { key: "review/notes", label: "个股笔记", icon: "sticky-note" }, + { key: "review/alerts", label: "提醒中心", icon: "bell" } ] }, system: { title: "系统管理", items: [ - { key: "system/appearance", label: "外观主题" }, - { key: "system/data", label: "数据管理" }, - { key: "system/about", label: "关于" } + { key: "system/profile", label: "账号资料", icon: "user" }, + { key: "system/password", label: "修改密码", icon: "lock" }, + { key: "system/membership", label: "会员状态", icon: "gem" }, + { key: "system/admin", label: "系统设置", icon: "sliders-horizontal", adminOnly: true }, + { key: "system/members", label: "会员管理", icon: "users", adminOnly: true } ] } }, diff --git a/app/frontend/m/css/shell.css b/app/frontend/m/css/shell.css index 4ea7a4e..d0939be 100644 --- a/app/frontend/m/css/shell.css +++ b/app/frontend/m/css/shell.css @@ -168,6 +168,64 @@ body { line-height: 1.5; } +.m-hub-grid { + list-style: none; + margin: 0; + padding: 0; + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 8px; +} + +.m-grid-item { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 6px; + min-height: var(--mobile-icon-cell); + padding: 8px 4px; + border: 0; + border-radius: 8px; + background: transparent; + color: var(--text-primary); + cursor: pointer; + -webkit-tap-highlight-color: transparent; +} + +.m-grid-item:active { + background: var(--surface); + transform: scale(0.96); +} + +.m-grid-icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 44px; + height: 44px; + border-radius: 12px; + background: var(--action-soft); + color: var(--action); + flex: 0 0 auto; +} + +.m-grid-icon svg { + width: 22px; + height: 22px; +} + +.m-grid-label { + font-size: 12px; + line-height: 1.3; + color: var(--text-primary); + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + max-width: 100%; +} + .m-auth { padding-top: 8px; } diff --git a/app/frontend/m/js/router.js b/app/frontend/m/js/router.js index 593b238..2863b8f 100644 --- a/app/frontend/m/js/router.js +++ b/app/frontend/m/js/router.js @@ -11,7 +11,32 @@ "notebook-pen": '', "message-square": '', "settings": '', - "inbox": '' + "inbox": '', + "activity": '', + "trending-up": '', + "trending-down": '', + "zap": '', + "history": '', + "chart-line": '', + "layers": '', + "refresh-cw": '', + "gavel": '', + "book-open": '', + "flame": '', + "crown": '', + "filter": '', + "target": '', + "bot": '', + "star": '', + "scroll-text": '', + "calendar-check": '', + "sticky-note": '', + "bell": '', + "user": '', + "lock": '', + "gem": '', + "sliders-horizontal": '', + "users": '' }; function icon(name, size) { @@ -127,11 +152,31 @@ document.getElementById("m-view").innerHTML = '
    ' + items + "
"; } + function visibleHubItems(hub) { + const items = hub && hub.items ? hub.items : []; + return items.filter(function (item) { + return !item.adminOnly || global.MobileSession.isAdmin(); + }); + } + function renderHub(key) { const hub = global.MobileNav.hubs[key]; - const title = hub ? hub.title : key; - updateHeader({ title: title, back: true }); - document.getElementById("m-view").innerHTML = placeholderHtml(title, "该入口的图标页将在后续批次实现。"); + if (!hub) { + renderHome(); + return; + } + const items = visibleHubItems(hub); + updateHeader({ title: hub.title, back: true }); + document.getElementById("m-view").innerHTML = + '
    ' + + items.map(function (item) { + return '
  • ' + + '
  • "; + }).join("") + + "
"; } function renderFeature(key) { diff --git a/app/frontend/m/js/session.js b/app/frontend/m/js/session.js index 6ef0cfc..faf6b38 100644 --- a/app/frontend/m/js/session.js +++ b/app/frontend/m/js/session.js @@ -43,5 +43,9 @@ } } - global.MobileSession = { state: state, me: me, login: login, register: register, logout: logout }; + function isAdmin() { + return Boolean(state.user && state.user.role === "admin"); + } + + global.MobileSession = { state: state, me: me, login: login, register: register, logout: logout, isAdmin: isAdmin }; })(window);