diff --git a/src/main/java/com/petstore/service/ReportHighlightVideoService.java b/src/main/java/com/petstore/service/ReportHighlightVideoService.java index a461c4c..ac01cf0 100644 --- a/src/main/java/com/petstore/service/ReportHighlightVideoService.java +++ b/src/main/java/com/petstore/service/ReportHighlightVideoService.java @@ -225,7 +225,8 @@ public class ReportHighlightVideoService { Path finalPath = outDir.resolve(filename); Files.copy(sourceToSave, finalPath, StandardCopyOption.REPLACE_EXISTING); - String url = "/api/upload/image/" + datePath + "/" + filename; + // 用完整 URL(包含 https://api.s-good.com),与前端 imgUrl() 逻辑一致 + String url = "https://api.s-good.com/api/upload/image/" + datePath + "/" + filename; synchronized (lockFor(reportId)) { reportMapper.findByIdAndDeletedFalse(reportId).ifPresent(r -> { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 92c4f65..d00ac11 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -46,6 +46,7 @@ logging: # 服务回顾短片:本地 ffmpeg 拼接(可换为云端生成式视频 API) app: + base-url: ${APP_BASE_URL:https://api.s-good.com} highlight-video: ffmpeg-binary: ${HIGHLIGHT_FFMPEG:ffmpeg}