feat(HEL-70): 手机端 P1 四大图标页(行情/工具/复盘/系统)
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -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 }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,32 @@
|
||||
"notebook-pen": '<path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"/><path d="M2 6h4"/><path d="M2 10h4"/><path d="M2 14h4"/><path d="M2 18h4"/><path d="m21.38 5.63-3-3a1 1 0 0 0-1.42 0l-5.01 5.01a2 2 0 0 0-.5.85l-.84 2.87a.5.5 0 0 0 .62.62l2.87-.84a2 2 0 0 0 .85-.5z"/>',
|
||||
"message-square": '<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>',
|
||||
"settings": '<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>',
|
||||
"inbox": '<path d="M22 12h-6l-2 3h-4l-2-3H2"/><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"/>'
|
||||
"inbox": '<path d="M22 12h-6l-2 3h-4l-2-3H2"/><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"/>',
|
||||
"activity": '<path d="M22 12h-4l-3 9L9 3l-3 9H2"/>',
|
||||
"trending-up": '<polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/><polyline points="16 7 22 7 22 13"/>',
|
||||
"trending-down": '<polyline points="22 17 13.5 8.5 8.5 13.5 2 7"/><polyline points="16 17 22 17 22 11"/>',
|
||||
"zap": '<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>',
|
||||
"history": '<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/><path d="M12 7v5l4 2"/>',
|
||||
"chart-line": '<path d="M3 3v18h18"/><path d="m19 9-5 5-4-4-3 3"/>',
|
||||
"layers": '<path d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"/><path d="m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"/><path d="m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"/>',
|
||||
"refresh-cw": '<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',
|
||||
"gavel": '<path d="m14 13-7.5 7.5c-.83.83-2.17.83-3 0 0 0 0 0 0 0a2.12 2.12 0 0 1 0-3L11 10"/><path d="m16 16 6-6"/><path d="m8 8 6-6"/><path d="m9 7 8 8"/><path d="m21 11-8-8"/>',
|
||||
"book-open": '<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>',
|
||||
"flame": '<path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"/>',
|
||||
"crown": '<path d="M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.735H5.81a1 1 0 0 1-.957-.735L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z"/><path d="M5 21h14"/>',
|
||||
"filter": '<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/>',
|
||||
"target": '<circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/>',
|
||||
"bot": '<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>',
|
||||
"star": '<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/>',
|
||||
"scroll-text": '<path d="M15 12h-5"/><path d="M15 8h-5"/><path d="M19 17V5a2 2 0 0 0-2-2H4"/><path d="M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"/>',
|
||||
"calendar-check": '<path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/><path d="m9 16 2 2 4-4"/>',
|
||||
"sticky-note": '<path d="M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z"/><path d="M15 3v4a2 2 0 0 0 2 2h4"/>',
|
||||
"bell": '<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>',
|
||||
"user": '<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',
|
||||
"lock": '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
|
||||
"gem": '<path d="M6 3h12l4 6-10 13L2 9Z"/><path d="M11 3 8 9l4 13 4-13-3-6"/><path d="M2 9h20"/>',
|
||||
"sliders-horizontal": '<line x1="21" x2="14" y1="4" y2="4"/><line x1="10" x2="3" y1="4" y2="4"/><line x1="21" x2="12" y1="12" y2="12"/><line x1="8" x2="3" y1="12" y2="12"/><line x1="21" x2="16" y1="20" y2="20"/><line x1="12" x2="3" y1="20" y2="20"/><line x1="14" x2="14" y1="2" y2="6"/><line x1="8" x2="8" y1="10" y2="14"/><line x1="16" x2="16" y1="18" y2="22"/>',
|
||||
"users": '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>'
|
||||
};
|
||||
|
||||
function icon(name, size) {
|
||||
@@ -127,11 +152,31 @@
|
||||
document.getElementById("m-view").innerHTML = '<ul class="m-entry-list">' + items + "</ul>";
|
||||
}
|
||||
|
||||
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 =
|
||||
'<ul class="m-hub-grid">' +
|
||||
items.map(function (item) {
|
||||
return '<li>' +
|
||||
'<button class="m-grid-item" type="button" data-route="#/feature/' + item.key + '">' +
|
||||
'<span class="m-grid-icon">' + icon(item.icon) + "</span>" +
|
||||
'<span class="m-grid-label">' + escapeHtml(item.label) + "</span>" +
|
||||
"</button></li>";
|
||||
}).join("") +
|
||||
"</ul>";
|
||||
}
|
||||
|
||||
function renderFeature(key) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user