修复讲解业务 API 数据源配置

This commit is contained in:
lyf
2026-07-07 18:05:42 +08:00
parent eaec80bdc3
commit 349f9b03e5
9 changed files with 140 additions and 20 deletions

View File

@@ -394,7 +394,7 @@ export class ExplainUseCase {
const entryTarget = await this.resolveDetailEntryTarget(request)
const fallbackExhibit = await this.resolveStaticDetailFallback(request, entryTarget)
if (fallbackExhibit) {
if (fallbackExhibit && dataSourceConfig.explainContentMode !== 'remote') {
return this.applyLanguageVariant(fallbackExhibit, entryTarget.lang)
}
@@ -403,7 +403,7 @@ export class ExplainUseCase {
.catch((error) => ({ stopInfo: null, error }))
if (stopInfoResult.stopInfo) {
return this.toExhibitFromStopInfo(stopInfoResult.stopInfo, null)
return this.toExhibitFromStopInfo(stopInfoResult.stopInfo, fallbackExhibit)
}
throw stopInfoResult.error || new Error('讲解详情加载失败')