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:
@@ -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