diff --git a/static/index.html b/static/index.html index b8e4482b..5f01fa3b 100644 --- a/static/index.html +++ b/static/index.html @@ -287,9 +287,28 @@ function renderRec(s) { } // ── Watchlist Tab ── +function showFullAnalysis(code) { + const text = window._fullAnalysisMap[code] || '暂无完整分析'; + const modal = document.createElement('div'); + modal.id = 'analysisModal'; + modal.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);z-index:9999;display:flex;align-items:center;justify-content:center'; + modal.innerHTML = `
+
+ 📋 九维分析 + × +
+
${text}
+
`; + modal.addEventListener('click', function(e) { if (e.target === this) this.remove(); }); + document.body.appendChild(modal); +} + function renderWatchlist() { const el = document.getElementById('tab-watchlist'); const stocks = watchlistData.stocks || []; + // 构建 code→full_analysis 映射 + window._fullAnalysisMap = {}; + stocks.forEach(s => { window._fullAnalysisMap[s.code] = s.full_analysis || ''; }); el.innerHTML = `
@@ -321,6 +340,11 @@ function renderWatchlist() { if (tech) detailLines.push('📊 ' + tech); if (sector) detailLines.push('🏭 ' + sector); const detailText = detailLines.join(' | '); + // 完整分析(点击展开) + const fullAnalysis = s.full_analysis || ''; + const detailDisplay = fullAnalysis ? + detailText + '
📋 查看完整九维分析' : + detailText; return `
${s.name}
${s.code}
@@ -331,7 +355,7 @@ function renderWatchlist() { ${signal||'—'} - ${detailText || '—'} + ${detailDisplay || '—'} `; }).join('')}