+8
-1
@@ -112,13 +112,20 @@
|
|||||||
const items = list.slice(0, 8).map(function (p) {
|
const items = list.slice(0, 8).map(function (p) {
|
||||||
const id = p.inst_id || "";
|
const id = p.inst_id || "";
|
||||||
const sheets = escapeHtml(String(p.sheets != null ? p.sheets : "—"));
|
const sheets = escapeHtml(String(p.sheets != null ? p.sheets : "—"));
|
||||||
|
const lev = Number(p.contract_leverage != null ? p.contract_leverage : p.leverage);
|
||||||
|
const levTxt =
|
||||||
|
Number.isFinite(lev) && lev > 0
|
||||||
|
? " · 约" + lev.toFixed(1) + "×"
|
||||||
|
: "";
|
||||||
const fromCond = tagOpen && (!opened || opened === id);
|
const fromCond = tagOpen && (!opened || opened === id);
|
||||||
return (
|
return (
|
||||||
"<li>" +
|
"<li>" +
|
||||||
escapeHtml(id) +
|
escapeHtml(id) +
|
||||||
" · " +
|
" · " +
|
||||||
sheets +
|
sheets +
|
||||||
"张 · " +
|
"张" +
|
||||||
|
escapeHtml(levTxt) +
|
||||||
|
" · " +
|
||||||
fmtPnlHtml(p.pnl_usdt) +
|
fmtPnlHtml(p.pnl_usdt) +
|
||||||
(fromCond ? '<span class="overview-cond-src">条件单</span>' : "") +
|
(fromCond ? '<span class="overview-cond-src">条件单</span>' : "") +
|
||||||
"</li>"
|
"</li>"
|
||||||
|
|||||||
@@ -15,6 +15,6 @@
|
|||||||
<div id="overview-grid"></div>
|
<div id="overview-grid"></div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ url_for('static', filename='hub.js') }}?v=25"></script>
|
<script src="{{ url_for('static', filename='hub.js') }}?v=26"></script>
|
||||||
<script>HubOverview.boot();</script>
|
<script>HubOverview.boot();</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user