diff --git a/app/static/futures_analysis.css b/app/static/futures_analysis.css
index 8df7931..e0c8a79 100644
--- a/app/static/futures_analysis.css
+++ b/app/static/futures_analysis.css
@@ -463,7 +463,23 @@ body {
.stats-overview {
display: grid;
grid-template-columns: repeat(4, 1fr);
- gap: 12px;
+ gap: 14px;
+}
+
+.stat-card {
+ transition: all 0.2s ease;
+}
+
+.stat-card:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
+}
+
+.stat-card:active {
+ transform: translateY(0);
+}
+
+.stats-overview {
margin-bottom: 20px;
}
diff --git a/app/static/futures_analysis.html b/app/static/futures_analysis.html
index f56dc64..ca7fa41 100644
--- a/app/static/futures_analysis.html
+++ b/app/static/futures_analysis.html
@@ -139,28 +139,28 @@
-
+
-
+
-
+
-
+
0
diff --git a/app/static/futures_analysis.js b/app/static/futures_analysis.js
index ed8c052..4e1a25b 100644
--- a/app/static/futures_analysis.js
+++ b/app/static/futures_analysis.js
@@ -462,9 +462,19 @@ function calcPriceChangePercent(current, target) {
function updateStats(data) {
const total = data.length;
- const upCount = data.filter(d => d.change > 0).length;
- const downCount = data.filter(d => d.change < 0).length;
- const neutralCount = total - upCount - downCount;
+
+ // 根据AI分析结果统计趋势(字符串包含判断)
+ const upCount = data.filter(d =>
+ d.suggestion?.includes('做多') || d.suggestion?.includes('试多')
+ ).length;
+
+ const downCount = data.filter(d =>
+ d.suggestion?.includes('做空') || d.suggestion?.includes('试空')
+ ).length;
+
+ const neutralCount = data.filter(d =>
+ d.suggestion?.includes('观望')
+ ).length;
document.getElementById('total-count').textContent = total;
document.getElementById('up-count').textContent = upCount;
@@ -474,6 +484,27 @@ function updateStats(data) {
document.getElementById('count-watched').textContent = watchedSymbols.length;
}
+function filterByTrend(trend) {
+ console.log('按趋势筛选:', trend);
+ let filtered = allFuturesData;
+
+ if (trend === 'up') {
+ filtered = allFuturesData.filter(d =>
+ d.suggestion?.includes('做多') || d.suggestion?.includes('试多')
+ );
+ } else if (trend === 'down') {
+ filtered = allFuturesData.filter(d =>
+ d.suggestion?.includes('做空') || d.suggestion?.includes('试空')
+ );
+ } else if (trend === 'neutral') {
+ filtered = allFuturesData.filter(d =>
+ d.suggestion?.includes('观望')
+ );
+ }
+
+ renderFuturesGrid(filtered);
+}
+
function filterFuturesList(keyword) {
keyword = keyword.toLowerCase();
const activeTab = document.querySelector('.filter-tab.active');