b77f30b3ff
Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
2.3 KiB
HTML
48 lines
2.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}品种简介 - 国内期货监控系统{% endblock %}
|
|
{% block content %}
|
|
<div class="card profile-page">
|
|
<h2>品种简介</h2>
|
|
<div class="card-body">
|
|
<form id="contract-search-form" class="form-row" method="get" action="{{ url_for('contract_profile_page') }}">
|
|
<div class="symbol-wrap" style="flex:1;min-width:220px;max-width:360px">
|
|
<input type="text" class="symbol-input" id="contract-symbol-input"
|
|
placeholder="输入品种或合约,如 螺纹钢 / rb2510" autocomplete="off" required>
|
|
<input type="hidden" name="symbol" id="contract-symbol-hidden" value="{{ symbol or '' }}">
|
|
<div class="symbol-dropdown"></div>
|
|
<div class="symbol-selected"></div>
|
|
</div>
|
|
<button type="submit" class="btn-primary">查询</button>
|
|
</form>
|
|
<p class="hint">展示交易所合约规格:交易单位、最小变动、保证金、交割规则等(数据来源:东方财富 / 新浪)。</p>
|
|
|
|
{% if error %}
|
|
<div class="flash" style="margin-top:1rem">{{ error }}</div>
|
|
{% elif profile %}
|
|
<div class="profile-head">
|
|
<strong>{{ profile.symbol_name or profile.ths_code }}</strong>
|
|
<span class="text-muted">{{ profile.ths_code }}</span>
|
|
{% if profile.exchange %}<span class="badge active">{{ profile.exchange }}</span>{% endif %}
|
|
<span class="profile-source">来源:{{ profile.source }}</span>
|
|
</div>
|
|
<div class="profile-spec">
|
|
{% for row in profile.rows %}
|
|
<div class="profile-row">
|
|
<div class="profile-label">{{ row.label }}</div>
|
|
<div class="profile-value">
|
|
{{ row.value }}
|
|
{% if row.hint %}<div class="profile-hint">{{ row.hint }}</div>{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% elif symbol %}
|
|
<p class="text-muted" style="margin-top:1rem">未查询到该合约简介,请检查合约代码是否正确。</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
{% block extra_js %}
|
|
<script src="{{ url_for('static', filename='js/contract.js') }}"></script>
|
|
{% endblock %}
|