fix: 修复外部因素数据源 - 北向资金改为南向资金,修复P0-P7全部外部因素
- P0资金面:DB数据过期时用麦蕊API获取资金流向 - P1市场情绪:去掉turnover字段依赖(DB无此字段) - P2南向资金:北向实时数据已停公布,改用南向资金(港股通)替代 - P3美股:用腾讯财经API替代失效的AKShare接口 - P4大宗商品:用腾讯财经API替代,修复var_name解析 - P7汇率:用新浪财经API替代失效的AKShare接口 - 修复评分详情API技术得分硬编码问题 - 前端传入tech_score参数确保明细与列表分数一致
This commit is contained in:
@@ -1041,3 +1041,80 @@
|
||||
color: var(--text-muted);
|
||||
background: rgba(255,255,255,0.06);
|
||||
}
|
||||
|
||||
/* 综合评分明细 */
|
||||
.scan-score-breakdown {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
padding: 10px 14px;
|
||||
margin: 8px 0;
|
||||
background: rgba(255,255,255,0.04);
|
||||
border-radius: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.score-breakdown-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 60px;
|
||||
}
|
||||
.score-breakdown-item .breakdown-label {
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.score-breakdown-item .breakdown-value {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.score-breakdown-item .breakdown-value.pos { color: var(--success); }
|
||||
.score-breakdown-item .breakdown-value.neg { color: var(--danger); }
|
||||
.score-breakdown-item.highlight .breakdown-value {
|
||||
color: var(--warning);
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* 外部因素详情面板 */
|
||||
.scan-external-factors {
|
||||
padding: 10px 14px;
|
||||
margin-bottom: 8px;
|
||||
background: rgba(255,255,255,0.03);
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.scan-external-factors.loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
.ext-factor-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 4px 0;
|
||||
font-size: 12px;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.03);
|
||||
}
|
||||
.ext-factor-item:last-child { border-bottom: none; }
|
||||
.ext-factor-label {
|
||||
flex-shrink: 0;
|
||||
min-width: 80px;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 600;
|
||||
}
|
||||
.ext-factor-score {
|
||||
flex-shrink: 0;
|
||||
min-width: 32px;
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.ext-factor-score.pos { color: var(--success); }
|
||||
.ext-factor-score.neg { color: var(--danger); }
|
||||
.ext-factor-summary {
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
@@ -2121,6 +2121,13 @@
|
||||
recommend_rate: scanItem.recommend_rate,
|
||||
has_scan_data: true,
|
||||
scan_triggered_count: scanCount,
|
||||
final_score: scanItem.final_score,
|
||||
technical_score: scanItem.technical_score,
|
||||
external_score: scanItem.external_score,
|
||||
verdict: scanItem.verdict,
|
||||
score_factors: null,
|
||||
score_summary: '',
|
||||
score_detail_loading: true,
|
||||
realtime_loading: true,
|
||||
realtime_signal_status: null,
|
||||
realtime_triggered_count: null,
|
||||
@@ -2158,6 +2165,24 @@
|
||||
this.techSignalResult.realtime_error = err.message || '获取失败';
|
||||
}
|
||||
}
|
||||
// 异步请求评分详情(外部因素),传入列表技术得分确保一致
|
||||
try {
|
||||
const techScore = scanItem.final_score ? Math.round(scanItem.final_score - (scanItem.external_score || 0)) : 50;
|
||||
const scoreResp = await axios.get(`/api/stock_score_detail/${code}?tech_score=${techScore}`);
|
||||
if (scoreResp.data.success && this.techSignalResult && this.techSignalResult.stock_code === code) {
|
||||
this.techSignalResult.score_factors = scoreResp.data.factors || null;
|
||||
this.techSignalResult.score_summary = scoreResp.data.summary || '';
|
||||
this.techSignalResult.final_score = scoreResp.data.final_score;
|
||||
this.techSignalResult.technical_score = scoreResp.data.technical_score;
|
||||
this.techSignalResult.external_score = scoreResp.data.external_score;
|
||||
this.techSignalResult.verdict = scoreResp.data.verdict;
|
||||
}
|
||||
} catch (e) {
|
||||
console.debug('评分详情获取失败:', e);
|
||||
}
|
||||
if (this.techSignalResult && this.techSignalResult.stock_code === code) {
|
||||
this.techSignalResult.score_detail_loading = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user