From 40c92fb3a6bd4a05210bcf0d104f2f9ffdbc6ed3 Mon Sep 17 00:00:00 2001 From: dekun Date: Thu, 20 Aug 2026 22:13:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E4=B9=B0=E4=B8=80=E5=B9=B3?= =?UTF-8?q?=E4=BB=93=E7=A1=AE=E8=AE=A4=E6=A1=86=EF=BC=9B=E5=8D=96=E5=9B=9E?= =?UTF-8?q?ETH=E4=BB=8D=E8=87=AA=E5=8A=A8=E6=89=A7=E8=A1=8C=E3=80=81?= =?UTF-8?q?=E4=B8=8D=E4=BA=8C=E6=AC=A1=E7=A1=AE=E8=AE=A4=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 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/common/static/options_panel.js b/lib/common/static/options_panel.js index b434890..e6fa1bc 100644 --- a/lib/common/static/options_panel.js +++ b/lib/common/static/options_panel.js @@ -2128,13 +2128,25 @@ alert("暂无有效买一深度,请稍后重试或到 OKX App 挂限价"); return; } + const lv = (preview.levels && preview.levels[0]) || {}; const posLike = { inst_id: inst, premium_ccy: q.premium_ccy || (preview.close_gate && preview.close_gate.premium_ccy) || null, margin_mode: q.options_margin_mode || q.margin_mode || null, }; const premCcy = posPremiumCcy(posLike); - // 买一平仓后币本位会自动卖回 ETH/BTC→USDT,不再弹确认框 + const msg = [ + "按买一限价卖出本轮可平张数?", + "合约: " + inst, + "锁定买一: " + (lv.px != null ? lv.px : "—") + " × " + (lv.sheets != null ? lv.sheets : preview.covered_sheets) + " 张", + "预计收回: " + fmtClosePreviewText(preview, posLike), + preview.estimated_pnl != null + ? ("预估盈亏: " + fmtPremiumAmtSigned(preview.estimated_pnl, premCcy)) + : "", + preview.uncovered_sheets > 0 ? "\n注意: 买一深度不足,预计仍剩 " + preview.uncovered_sheets + " 张,需下次再平。" : "", + isCoinPos(posLike) ? "\n(平仓成功后将自动卖回 ETH/BTC→USDT,不再二次确认)" : "" + ].filter(function (x) { return x !== ""; }).join("\n"); + if (!confirm(msg)) return; if (btn) btn.disabled = true; try { const r = await apiJson("/api/options/close", {