From 66c21ae449674c1d11085418d97f0da8c606b156 Mon Sep 17 00:00:00 2001 From: MaDaLei Date: Fri, 17 Apr 2026 20:21:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20highlightVideoUrl=E5=AD=98=E5=AE=8C?= =?UTF-8?q?=E6=95=B4URL=EF=BC=9B=E6=B7=BB=E5=8A=A0app.base-url=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/petstore/service/ReportHighlightVideoService.java | 3 ++- src/main/resources/application.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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}