From 8afd28ca1080f7637f48d2a2d4637cfb5028a1a8 Mon Sep 17 00:00:00 2001 From: old burden Date: Wed, 8 Apr 2026 15:23:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BE=93=E5=87=BA=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E5=92=8C=E5=89=8D=E7=AB=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- portal-ui/src/views/ThirdPartyAsset.vue | 11 ++++++++++- .../main/java/com/ruoyi/api/ByteApiController.java | 6 +++--- .../java/com/ruoyi/ai/service/impl/ByteService.java | 8 ++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/portal-ui/src/views/ThirdPartyAsset.vue b/portal-ui/src/views/ThirdPartyAsset.vue index 429b4b1..61651e5 100644 --- a/portal-ui/src/views/ThirdPartyAsset.vue +++ b/portal-ui/src/views/ThirdPartyAsset.vue @@ -12,6 +12,9 @@
查询 + + +
@@ -48,7 +51,7 @@ 打开 - - + 提交失败 @@ -275,6 +278,9 @@ export default { this.pageNum = p this.loadList(p) }, + refreshList() { + this.loadList(this.pageNum || 1) + }, async removeRow(row) { if (!row || !row.id) return this.deletingId = row.id @@ -433,6 +439,9 @@ export default { color: rgba(255, 255, 255, 0.4); padding: 24px !important; } +.tpa-failed-text { + color: #ff6b6b; +} .tpa-pagination { margin-top: 16px; justify-content: flex-end; diff --git a/web-api/ruoyi-admin/src/main/java/com/ruoyi/api/ByteApiController.java b/web-api/ruoyi-admin/src/main/java/com/ruoyi/api/ByteApiController.java index 7871511..a0e14ed 100644 --- a/web-api/ruoyi-admin/src/main/java/com/ruoyi/api/ByteApiController.java +++ b/web-api/ruoyi-admin/src/main/java/com/ruoyi/api/ByteApiController.java @@ -96,7 +96,7 @@ public class ByteApiController extends BaseController { ByteBodyReq byteBodyReq = new ByteBodyReq(); // model由前端传入,默认为Seedance 2.0 byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ? - request.getModel() : "ep-20260326165811-dlkth"); + request.getModel() : "doubao-seedance-2.0"); byteBodyReq.setPrompt(text); byteBodyReq.setSequential_image_generation("disabled"); byteBodyReq.setResponse_format("url"); @@ -175,7 +175,7 @@ public class ByteApiController extends BaseController { aiOrder.setImg1(firstUrl.toString()); ByteBodyReq byteBodyReq = new ByteBodyReq(); byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ? - request.getModel() : "ep-20260326165811-dlkth"); + request.getModel() : "doubao-seedance-2.0"); byteBodyReq.setPrompt(text); byteBodyReq.setImage(firstUrl); byteBodyReq.setSequential_image_generation("disabled"); @@ -255,7 +255,7 @@ public class ByteApiController extends BaseController { ByteBodyReq byteBodyReq = new ByteBodyReq(); // model由前端传入,默认为Seedance2.0 byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ? - request.getModel() : "ep-20260326165811-dlkth"); + request.getModel() : "doubao-seedance-2.0"); byteBodyReq.setCallback_url(volcCallbackUrl); // 构建符合火山引擎格式的content diff --git a/web-api/ruoyi-system/src/main/java/com/ruoyi/ai/service/impl/ByteService.java b/web-api/ruoyi-system/src/main/java/com/ruoyi/ai/service/impl/ByteService.java index e1ffd17..58aa88c 100644 --- a/web-api/ruoyi-system/src/main/java/com/ruoyi/ai/service/impl/ByteService.java +++ b/web-api/ruoyi-system/src/main/java/com/ruoyi/ai/service/impl/ByteService.java @@ -101,7 +101,7 @@ public class ByteService implements IByteService { String jsonBody = objectMapper.writeValueAsString(req); Request request = new Request.Builder() - .url(volcBaseUrl + "/api/v3/contents/generations/tasks") + .url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks") .header("Content-Type", "application/json") .header("Authorization", "Bearer " + arkApiKey) .post(RequestBody.create( @@ -140,7 +140,7 @@ public class ByteService implements IByteService { } Request request = new Request.Builder() - .url(volcBaseUrl + "/api/v3/contents/generations/tasks/" + id) + .url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks/" + id) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + arkApiKey) .get() @@ -177,7 +177,7 @@ public class ByteService implements IByteService { try { Request request = new Request.Builder() - .url(volcBaseUrl + "/api/v3/contents/generations/tasks/" + id) + .url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks/" + id) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + arkApiKey) .delete() @@ -204,7 +204,7 @@ public class ByteService implements IByteService { int pn = pageNum > 0 ? pageNum : 1; int ps = pageSize > 0 ? Math.min(pageSize, 500) : 10; - HttpUrl parsed = HttpUrl.parse(volcBaseUrl + "/api/v3/contents/generations/tasks"); + HttpUrl parsed = HttpUrl.parse(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks"); if (parsed == null) { throw new Exception("listVideoGenerationTasks error:invalid base url"); }