/* AI 分析详情页:研报正文 + 数据源 */ const CODE_AID = parseInt(location.pathname.split('/').pop(), 10); async function load() { try { const d = await api('/api/analyses/' + CODE_AID); const a = d.analysis, stock = d.stock || {}; $('#aStock').textContent = a.stock_name || stock.name || '—'; $('#aCode').textContent = a.code; $('#aIndustry').textContent = stock ? (stock.name + ' · ' + (stock.industry || '') + ' · ' + (stock.board || '')) : ''; $('#aTime').textContent = a.created_at; $('#aFocus').textContent = a.focus || '整体投资价值'; $('#reportBox').innerHTML = mdRender(a.report); renderSources(a.sources || {}); } catch (e) { $('#reportBox').innerHTML = '
${escapeHtml(s.profile)}
` : '', s.profile ? 1 : 0); // 3. 技术指标 html += srcBlock('技术指标', '📈', s.indicators ? `${escapeHtml(s.indicators)}` : '', s.indicators ? 1 : 0);
// 4. 综合评分
if (s.score) {
const sc = s.score;
html += srcBlock('综合评分', '🎯', `
| 机构 | 评级 | 目标价 | 日期 |
|---|---|---|---|
| ${escapeHtml(r.inst_name)} | ${r.target_price} | ${r.rating_date} |
| 机构 | 季度 | 持仓市值 | 环比 |
|---|---|---|---|
| ${escapeHtml(h.inst_name)} | ${h.quarter} | ${fmtNum(h.hold_value)} | ${fmtPct(h.change_pct)} |
${escapeHtml(s.prompt)}` : '', s.prompt ? 1 : 0);
$('#sourceBox').innerHTML = html;
}
load();