38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}行情数据{% endblock %}
|
|
{% block heading %}行情数据{% endblock %}
|
|
{% block breadcrumb %}<a href="/contracts/">合约总览</a>{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="section-title">合约列表</div>
|
|
|
|
<div class="table-wrap">
|
|
<table>
|
|
<tr><th>合约</th><th>日期</th><th>开盘</th><th>收盘</th><th>最高</th><th>最低</th><th>振幅</th><th>操作</th></tr>
|
|
{% for c in contracts %}
|
|
<tr>
|
|
<td><strong>{{ c }}</strong></td>
|
|
{% if c in contract_bars %}
|
|
<td>{{ contract_bars[c].date }}</td>
|
|
<td>{{ contract_bars[c].open|int }}</td>
|
|
<td>{{ contract_bars[c].close|int }}</td>
|
|
<td>{{ contract_bars[c].high|int }}</td>
|
|
<td>{{ contract_bars[c].low|int }}</td>
|
|
<td>
|
|
{% if contract_bars[c].amp_5d %}
|
|
<span class="badge badge-up">{{ contract_bars[c].amp_5d|int }}</span>
|
|
{% else %}
|
|
<span class="na">—</span>
|
|
{% endif %}
|
|
</td>
|
|
{% else %}
|
|
<td colspan="6" class="na">暂无数据</td>
|
|
{% endif %}
|
|
<td><a href="/contracts/{{ c }}" style="color:var(--accent);text-decoration:none;">详情 →</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|