feat: add hub fund overview tab with 180-day equity curves

Add /funds page for total and per-account balance (funding+trading), drawdown, and daily snapshots from monitor board aggregation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-10 16:50:47 +08:00
parent 6eb17b7ddc
commit 77c7bbbb13
14 changed files with 1069 additions and 112 deletions
+33 -2
View File
@@ -15,7 +15,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'" />
<noscript><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" /></noscript>
<link rel="stylesheet" href="/assets/app.css?v=20260609-market-day-split" />
<link rel="stylesheet" href="/assets/app.css?v=20260609-hub-funds" />
</head>
<body>
<div class="app-bg" aria-hidden="true"></div>
@@ -47,6 +47,7 @@
<a href="/monitor" id="nav-monitor">监控区</a>
<a href="/market" id="nav-market">行情区</a>
<a href="/archive" id="nav-archive">币种档案</a>
<a href="/funds" id="nav-funds">资金概况</a>
<a href="/ai" id="nav-ai">AI 教练</a>
<a href="/settings" id="nav-settings">系统设置</a>
</nav>
@@ -330,6 +331,35 @@
</div>
</div>
<div id="page-funds" class="page hidden">
<div class="page-head">
<h1><span class="head-tag">FND</span> 资金概况</h1>
<p class="page-desc">总资金 = 各监控户(资金账户 + 交易账户);按北京时间交易日切日快照,保留 180 天</p>
</div>
<div class="funds-toolbar toolbar">
<button type="button" id="funds-btn-refresh" class="primary">刷新</button>
<span id="funds-status" class="toolbar-meta funds-status"></span>
</div>
<section class="funds-summary">
<div class="funds-stat-card">
<div class="funds-stat-label">总资金</div>
<div id="funds-total-usdt" class="funds-stat-value"></div>
</div>
<div class="funds-stat-card">
<div class="funds-stat-label">较昨日</div>
<div id="funds-total-delta" class="funds-stat-val"></div>
</div>
<div class="funds-stat-card">
<div class="funds-stat-label">最大回撤</div>
<div class="funds-stat-value"><span id="funds-total-dd-u"></span> <small id="funds-total-dd-pct" class="funds-dd-pct"></small></div>
</div>
</section>
<p id="funds-meta" class="funds-meta"></p>
<div id="funds-chart-total" class="funds-chart-host"></div>
<h2 class="funds-section-title">分户资金</h2>
<div id="funds-accounts" class="funds-accounts"></div>
</div>
<div id="page-ai" class="page hidden">
<div class="page-head">
<h1><span class="head-tag">AI</span> 教练</h1>
@@ -426,7 +456,8 @@
<script src="/assets/chart_draw.js?v=20260609-market-day-split"></script>
<script src="/assets/chart.js?v=20260609-market-day-split"></script>
<script src="/assets/archive.js?v=20260608-hub-archive-history"></script>
<script src="/assets/funds.js?v=20260609-hub-funds"></script>
<script src="/assets/ai_review_render.js?v=2"></script>
<script src="/assets/app.js?v=20260609-hub-mobile-ai-v3"></script>
<script src="/assets/app.js?v=20260609-hub-funds"></script>
</body>
</html>