From 4eb409b51a07b2a650a1158ee687bde67b85af3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=A5=E5=BE=AE?= Date: Sun, 21 Jun 2026 02:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E9=A1=B5=E6=94=B9=E7=89=88?= =?UTF-8?q?=EF=BC=9A=E4=B8=89=E6=A0=8F=E5=B1=95=E7=A4=BA=EF=BC=88=E8=A1=8C?= =?UTF-8?q?=E4=B8=9A+=E8=B6=8B=E5=8A=BF=E4=BF=A1=E5=8F=B7+=E5=B0=8F?= =?UTF-8?q?=E6=9E=9C=E6=89=AB=E6=8F=8F=EF=BC=89=EF=BC=8C=E5=8F=96=E4=BB=A3?= =?UTF-8?q?=E6=97=A7=E6=B4=9E=E5=AF=9F/=E6=BD=9C=E5=8A=9B=E8=82=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 66 +++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/static/index.html b/static/index.html index 5e55ee0..8070d32 100644 --- a/static/index.html +++ b/static/index.html @@ -362,38 +362,54 @@ let marketRefreshInterval = null; function refreshMarketData() { const el = document.getElementById('tab-market'); if (!el || el.classList.contains('hidden')) return; - fetchJSON('/api/market').then(d => { - const sectors = d.sectors || []; - const insights = d.insights || []; - const potentials = d.potential_stocks || []; + Promise.all([ + fetchJSON('/api/market'), + fetchJSON('/api/signals'), + ]).then(([mkt, signals]) => { + const sectors = mkt.sectors || []; + const sigs = signals || []; + const xiaoguo = sigs.filter(s => s.source === 'xiaoguo'); + const trend = sigs.filter(s => s.source !== 'xiaoguo'); el.innerHTML = ` -
+
-

🏭 行业热点

- ${sectors.length ? sectors.map(s => ` -
- ${s.name} - - ${(s.change||0)>=0?'+':''}${(s.change||0).toFixed(2)}% - +

🏭 行业热点

+ ${sectors.length ? sectors.slice(0,8).map(s => ` +
+ ${s.name} + ${(s.change||0)>=0?'+':''}${(s.change||0).toFixed(1)}%
- `).join('') : '
暂无行业数据
'} + `).join('') : '
暂无
'}
-

💡 知微洞察

- ${insights.length ? insights.map(i => - `
${i}
` - ).join('') : '
暂无洞察
'} +

📡 趋势信号 (${trend.length})

+ ${trend.length ? trend.slice(0,6).map(s => ` +
+ ${s.overall_sentiment||'中性'} + ${s.sector} ${(s.summary||'').slice(0,60)} +
+ `).join('') : '
暂无
'} +
+
+

🔍 小果扫描 (${xiaoguo.length})

+ ${xiaoguo.length ? xiaoguo.slice(0,6).map(s => ` +
+ ${s.overall_sentiment||'中性'} + ${s.sector} ${(s.summary||'').slice(0,60)} +
+ `).join('') : '
暂无
'}
-
-

🔍 潜力股挖掘

- ${potentials.length ? potentials.map(p => ` -
- ${p.name||p.code} - ${p.reason||''} -
- `).join('') : '
暂无挖掘
'} +
+

📋 全部板块排行(${sectors.length})

+
+ ${sectors.map(s => ` +
+ ${s.name} + ${(s.change||0)>=0?'+':''}${(s.change||0).toFixed(1)}% +
+ `).join('')} +
`; });