修复讲解业务 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

@@ -119,7 +119,9 @@ const normalizeBaseUrl = (baseUrl: string) => {
}
const resolveAudioApiBaseUrl = () => {
const baseUrl = normalizeBaseUrl(dataSourceConfig.apiBaseUrl)
// Catalog APIs use apiBaseUrl in BackendExplainContentProvider; stop/detail/play/text APIs use audioApiBaseUrl.
// They are both /app-api today, but audioApiBaseUrl can be split to a dedicated proxy or host later.
const baseUrl = normalizeBaseUrl(dataSourceConfig.audioApiBaseUrl)
return baseUrl.endsWith('/app-api') ? baseUrl : `${baseUrl}/app-api`
}