fix: 评估页字段名错误(evaluations→advice_evaluation)

This commit is contained in:
知微
2026-06-21 02:55:12 +08:00
parent 4eb409b51a
commit 9d85601904
+4 -4
View File
@@ -814,14 +814,14 @@ function renderEvaluation() {
<th class="text-left p-3">状态</th>
</tr></thead>
<tbody>${evals.map(x => {
const e = x.evaluations[0] || {};
const t = e.theoretical || {};
const a = e.actual || {};
const adv = (x.advice_evaluation && x.advice_evaluation[0]) || {};
const t = x.theoretical || {};
const a = x.actual || {};
const status = t.status || 'safe';
const icon = status === 'take_profit_hit' ? '🟢' : status === 'stop_loss_hit' ? '🔴' : status === 'in_entry_zone' ? '📥' : '💤';
return `<tr class="stock-row border-b border-slate-800/30">
<td class="p-3"><div class="font-medium text-white">${x.name}</div><div class="text-slate-500">${x.code}</div></td>
<td class="p-3 text-slate-300">${x.current?.slice(0,40)||'—'}</td>
<td class="p-3 text-slate-300">${x.current || (x.advice_evaluation && x.advice_evaluation[0] && x.advice_evaluation[0].current_advice || '') || '—'}</td>
<td class="p-3"><span class="${(t.theoretical_pnl_pct||0)>=0?'badge-up':'badge-down'}">${(t.theoretical_pnl_pct||0).toFixed(1)}%</span></td>
<td class="p-3"><span class="${(a.actual_pnl_pct||0)>=0?'badge-up':'badge-down'}">${(a.actual_pnl_pct||0).toFixed(1)}%</span></td>
<td class="p-3">${icon} ${status.replace(/_/g,' ')}</td>