From 41c85c36a9288b4764896bf304f9173e45abe80d Mon Sep 17 00:00:00 2001 From: dekun Date: Wed, 30 Sep 2026 21:59:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BE=84=E6=B8=85=E7=BF=BB=E5=80=8D=E5=87=BA?= =?UTF-8?q?=E5=9C=BA=E6=96=87=E6=A1=88=EF=BC=9A=E6=8C=89=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E5=80=8D=E6=95=B0=E6=98=BE=E7=A4=BA=E9=9C=80=E5=9B=9E=E6=94=B6?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=EF=BC=8C=E9=81=BF=E5=85=8D=E8=AF=AF=E8=AF=BB?= =?UTF-8?q?=E6=88=90=E6=8C=891=E5=80=8D=E7=AE=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- lib/common/static/options_panel.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/common/static/options_panel.js b/lib/common/static/options_panel.js index cba1fab..c8677d5 100644 --- a/lib/common/static/options_panel.js +++ b/lib/common/static/options_panel.js @@ -1674,6 +1674,21 @@ return fmt(n, 2) + "倍"; } + function profitExitHint(mult, req, premCcy) { + const n = Number(mult); + const m = Number.isFinite(n) && n > 0 ? n : 1; + const needFactor = 1 + m; + const factorTxt = Math.abs(needFactor - Math.round(needFactor)) < 1e-9 + ? String(Math.round(needFactor)) + : fmt(needFactor, 2); + let hint = formatProfitExitMultLabel(m) + "=盈利达权利金×" + fmt(m, 2) + + " → 需回收≥权利金×" + factorTxt; + if (req != null) { + hint += " · 即≥" + fmtPremiumAmt(req, premCcy) + " " + premCcy; + } + return hint; + } + function renderProfitExitRow(p) { const inst = p.inst_id || ""; if (p.hedge_plan_target) { @@ -1694,6 +1709,7 @@ const statePe = String(p.profit_exit_state || (enabled ? "active" : "idle")); const req = p.profit_exit_required_recycle; const premCcy = posPremiumCcy(p); + const hintMult = Number.isFinite(multNum) && multNum > 0 ? multNum : serverMult; let statusTxt = enabled ? ("监控中 · " + multLabel) : "未开启"; if (enabled && statePe === "closing") statusTxt = "平仓挂单中 · " + multLabel; return ( @@ -1710,7 +1726,7 @@ '' + statusTxt + "" + '' + (enabled - ? ("1倍=盈利=权利金" + (req != null ? (" · 需回收≥" + fmtPremiumAmt(req, premCcy) + " " + premCcy) : "")) + ? profitExitHint(hintMult, req, premCcy) : "开启后自选倍数;达标按买一限价平;可随时关闭") + "" + ""