Phone tabbar: 下单/关键位/期权, hide options tab when unavailable.

This commit is contained in:
dekun
2026-07-27 07:48:11 +08:00
parent 6886de0bad
commit 1755f67eca
2 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
* 实例手机壳: ≤720px 底栏 +「更多」,与 embed soft-nav 同步.
*/
(function (global) {
const PRIMARY = { trade: 1, key_monitor: 1, records: 1 };
const PRIMARY = { trade: 1, key_monitor: 1, options: 1 };
const MQ = "(max-width: 720px)";
function isEmbedShell() {
+9 -7
View File
@@ -95,9 +95,11 @@
<!-- 手机端主导航(≤720px);桌面不显示 -->
<nav id="inst-mobile-tabbar" class="inst-mobile-tabbar" aria-label="手机主导航">
<a href="/trade" class="inst-m-tab{% if initial_tab == 'trade' %} active{% endif %}" data-embed-tab="trade"{% if not display.show_nav_trade %} style="display:none"{% endif %}>实盘</a>
<a href="/key_monitor" class="inst-m-tab{% if initial_tab == 'key_monitor' %} active{% endif %}" data-embed-tab="key_monitor"{% if not display.show_nav_key_monitor %} style="display:none"{% endif %}></a>
<a href="/records" class="inst-m-tab{% if initial_tab == 'records' %} active{% endif %}" data-embed-tab="records"{% if not display.show_nav_records %} style="display:none"{% endif %}>记录</a>
<a href="/trade" class="inst-m-tab{% if initial_tab == 'trade' %} active{% endif %}" data-embed-tab="trade"{% if not display.show_nav_trade %} style="display:none"{% endif %}>下单</a>
<a href="/key_monitor" class="inst-m-tab{% if initial_tab == 'key_monitor' %} active{% endif %}" data-embed-tab="key_monitor"{% if not display.show_nav_key_monitor %} style="display:none"{% endif %}>关键</a>
{% if options_nav_visible and display.show_nav_options %}
<a href="/options" class="inst-m-tab{% if initial_tab == 'options' %} active{% endif %}" data-embed-tab="options">期权</a>
{% endif %}
<button type="button" class="inst-m-tab" data-embed-tab="more" id="inst-m-tab-more" aria-haspopup="dialog" aria-expanded="false">更多</button>
</nav>
<div id="inst-mobile-more" class="inst-mobile-more" aria-hidden="true">
@@ -108,6 +110,9 @@
<p class="inst-mobile-more-hint">次要页面 · 完整界面请用电脑</p>
<nav class="inst-mobile-more-nav" aria-label="更多页面">
<a href="/dashboard" data-embed-tab="dashboard"{% if not display.show_nav_dashboard %} style="display:none"{% endif %}>数据看板</a>
{% if display.show_nav_records %}
<a href="/records" data-embed-tab="records">交易记录</a>
{% endif %}
{% if not intraday_discipline and display.show_nav_strategy %}
<a href="/strategy" data-embed-tab="strategy">策略交易</a>
{% endif %}
@@ -117,9 +122,6 @@
{% if display.show_nav_stats %}
<a href="/stats" data-embed-tab="stats">统计分析</a>
{% endif %}
{% if options_nav_visible and display.show_nav_options %}
<a href="/options" data-embed-tab="options">期权</a>
{% endif %}
{% if options_nav_visible and display.show_nav_options_review %}
<a href="/options/review" data-embed-tab="options_review">期权复盘</a>
{% endif %}
@@ -167,6 +169,6 @@ window.__INSTANCE_DISPLAY__ = {{ display | tojson }};
<script src="/static/instance_settings_prefs.js?v=16"></script>
<script src="/static/instance_live.js?v=6"></script>
<script src="/static/instance_embed.js?v=29"></script>
<script src="/static/instance_mobile_nav.js?v=1"></script>
<script src="/static/instance_mobile_nav.js?v=2"></script>
</body>
</html>