fix: 输出打印和前端优化
This commit is contained in:
parent
df3bcf67d6
commit
8afd28ca10
|
|
@ -12,6 +12,9 @@
|
|||
<div class="tpa-filter">
|
||||
<a-input v-model="filters.reviewBatchId" allow-clear placeholder="审核批次 ID" style="width: 220px" />
|
||||
<a-button type="primary" :loading="listLoading" @click="loadList(1)">查询</a-button>
|
||||
<a-button shape="circle" :loading="listLoading" @click="refreshList">
|
||||
<icon-refresh />
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<a-spin :loading="listLoading">
|
||||
|
|
@ -48,7 +51,7 @@
|
|||
</td>
|
||||
<td class="tpa-ellipsis">
|
||||
<a v-if="row.tosUrl" :href="row.tosUrl" target="_blank" rel="noopener">打开</a>
|
||||
<span v-else>-</span>
|
||||
<span v-else class="tpa-failed-text">提交失败</span>
|
||||
</td>
|
||||
<td>
|
||||
<a-button type="outline" status="danger" size="mini" :loading="deletingId === row.id" @click="removeRow(row)">
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue