diff --git a/frontend/src/components/Recommendations.css b/frontend/src/components/Recommendations.css index d0b68df..c9d3d31 100644 --- a/frontend/src/components/Recommendations.css +++ b/frontend/src/components/Recommendations.css @@ -288,6 +288,45 @@ font-weight: 500; } +.param-item.order-type { + grid-column: span 2; +} + +.order-type-badge { + display: inline-block; + padding: 4px 8px; + border-radius: 4px; + font-size: 12px; + font-weight: bold; +} + +.order-type-badge.limit { + background-color: #2196F3; + color: white; +} + +.order-type-badge.market { + background-color: #FF9800; + color: white; +} + +.param-item.limit-price { + grid-column: span 2; +} + +.limit-price-value { + display: flex; + flex-direction: column; + gap: 4px; +} + +.price-diff { + font-size: 11px; + color: #666; + font-weight: normal; + font-style: italic; +} + .card-actions { display: flex; gap: 10px; diff --git a/frontend/src/components/Recommendations.jsx b/frontend/src/components/Recommendations.jsx index f848b06..0b6dcca 100644 --- a/frontend/src/components/Recommendations.jsx +++ b/frontend/src/components/Recommendations.jsx @@ -343,6 +343,26 @@ function Recommendations() {
+
+ + + {rec.order_type === 'LIMIT' ? '限价单' : '市价单'} + +
+ {rec.order_type === 'LIMIT' && rec.suggested_limit_price && ( +
+ + + {parseFloat(rec.suggested_limit_price || 0).toFixed(4)} USDT + {rec.current_price && ( + + ({rec.direction === 'BUY' ? '低于' : '高于'}当前价 + {Math.abs(((rec.suggested_limit_price - rec.current_price) / rec.current_price) * 100).toFixed(2)}%) + + )} + +
+ )}
{parseFloat(rec.suggested_stop_loss || 0).toFixed(4)}