fix: 统计日历服务端内嵌 bootstrap,首屏显示盈亏与笔数

与月统计同源 initial_calendar 写入页面,API 失败时仍渲染;四所日历路由独立注册并传入 get_db_fn。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-30 09:13:58 +08:00
parent 4f784d09ac
commit 3b687d17eb
15 changed files with 195 additions and 53 deletions
+3
View File
@@ -452,6 +452,9 @@
</select>
</label>
</div>
{% if stats_bundle.initial_calendar %}
<script type="application/json" id="stats-calendar-bootstrap">{{ stats_bundle.initial_calendar | tojson }}</script>
{% endif %}
<div id="stats-calendar-wrap" class="trade-cal-wrap stats-calendar-wrap">
<div class="trade-cal-head">
<button type="button" id="stats-cal-prev" class="btn" title="上一月"></button>
+5 -5
View File
@@ -3,12 +3,12 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<script src="/static/instance_theme.js?v=37"></script>
<script src="/static/instance_theme.js?v=47"></script>
<link rel="stylesheet" href="/static/instance_theme_early.css?v=4">
<link rel="stylesheet" href="/static/account_risk_badge.css?v=4">
<link rel="stylesheet" href="/static/instance_page.css?v=2">
<link rel="stylesheet" href="/static/instance_theme.css?v=38">
<link rel="stylesheet" href="/static/trade_stats_calendar.css?v=3">
<link rel="stylesheet" href="/static/instance_theme.css?v=48">
<link rel="stylesheet" href="/static/trade_stats_calendar.css?v=4">
<script src="/static/account_risk_badge.js?v=4"></script>
<meta name="theme-color" content="#0b0d14">
<title>{{ exchange_display }} · 加密货币 | 交易监控复盘系统</title>
@@ -113,7 +113,7 @@
</div>
</div>
<script src="/static/instance_ui.js?v=3"></script>
<script src="/static/instance_ui.js?v=4"></script>
<script src="/static/instance_records_mobile.js?v=2"></script>
<script src="/static/time_close_ui.js?v=2"></script>
<script src="/static/ai_review_render.js?v=2"></script>
@@ -121,7 +121,7 @@
<script src="/static/manual_order_rr_preview.js?v=5"></script>
<script src="/static/strategy_roll.js?v=5"></script>
<script src="/static/key_monitor_form.js?v=2"></script>
<script src="/static/trade_stats_calendar.js?v=3"></script>
<script src="/static/trade_stats_calendar.js?v=4"></script>
{% include 'embed_boot_scripts.html' %}
<script src="/static/instance_embed.js?v=5"></script>
</body>