From 79adc79f980928e9b5778bfbfc7e4f8c0147ede3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=87=E8=96=87=E5=AE=89?= Date: Sun, 8 Feb 2026 20:38:12 +0800 Subject: [PATCH] 1 --- frontend/src/components/StatsDashboard.jsx | 47 +++++++++++++++------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/StatsDashboard.jsx b/frontend/src/components/StatsDashboard.jsx index 76c62ca..1f1c205 100644 --- a/frontend/src/components/StatsDashboard.jsx +++ b/frontend/src/components/StatsDashboard.jsx @@ -728,7 +728,8 @@ const StatsDashboard = () => {
开仓时间: {formatEntryTime(trade.entry_time)}
)} -
+
+
止损: -{stopLossPercent.toFixed(2)}% (of margin) @@ -753,23 +754,39 @@ const StatsDashboard = () => { )}
- {/* 显示币安实际挂单信息 */} + {/* 显示币安实际挂单信息 (优化版) */} {trade.open_orders && trade.open_orders.length > 0 && ( -
-
条件单 (Binance):
- {trade.open_orders.map(order => ( -
- - {order.type.replace('_MARKET', '')} - - - {order.type.includes('STOP') ? `触发价: ${fmtPrice(order.stopPrice)}` : `价格: ${fmtPrice(order.price)}`} - - {order.status} -
- ))} +
+
+ Binance 挂单 + ({trade.open_orders.length}) +
+
+ {trade.open_orders.map(order => { + // 判断类型 + const isSL = order.type.includes('STOP') + const isTP = order.type.includes('TAKE_PROFIT') + + // 简化显示文本 + let typeLabel = order.type.replace('_MARKET', '') + if (isSL) typeLabel = '止损' + else if (isTP) typeLabel = '止盈' + + // 价格 + const priceVal = order.stopPrice > 0 ? order.stopPrice : order.price + + return ( +
+ {typeLabel} + {fmtPrice(priceVal)} + {order.reduceOnly && R} +
+ ) + })} +
)} +
= 0 ? 'positive' : 'negative'}`}>