feat: 品种推荐与下单显示主力合约

推荐列表展示当前主力代码;下单品种支持中文/代码搜索并按交易所分组选择主力合约。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-24 12:56:06 +08:00
parent 3ba3be6035
commit aea9aca472
7 changed files with 94 additions and 41 deletions
+4 -3
View File
@@ -37,9 +37,10 @@
<div class="trade-form-rows">
<div class="trade-form-line line-3">
<div class="symbol-wrap trade-field">
<div class="symbol-wrap trade-field symbol-mains">
<label class="text-label">品种</label>
<input type="text" id="trade-symbol" class="symbol-input" placeholder="主力合约 rb2610" autocomplete="off">
<input type="text" id="trade-symbol" class="symbol-input" placeholder="输入中文或代码,选择主力合约" autocomplete="off">
<input type="hidden" id="trade-symbol-code" class="symbol-ths-code">
<div class="symbol-dropdown"></div>
<div class="symbol-selected" id="sym-selected"></div>
</div>
@@ -120,7 +121,7 @@
{% if recommend_rows %}
{% for r in recommend_rows %}
<tr class="rec-{{ r.status }}">
<td><strong>{{ r.name }}</strong> <span class="text-muted">{{ r.ths }}</span></td>
<td><strong>{{ r.name }}</strong> <span class="text-accent">{{ r.main_code or r.ths }}</span></td>
<td>{{ r.exchange }}</td>
<td>{% if r.price %}{{ r.price }}{% else %}—{% endif %}</td>
<td>{% if r.margin_one_lot %}{{ r.margin_one_lot }}{% else %}—{% endif %}</td>