fix: 修复数据格式错误

This commit is contained in:
imeepos 2025-09-04 21:12:28 +08:00
parent fd7d619a51
commit 4311527356
1 changed files with 6 additions and 6 deletions

View File

@ -19,8 +19,8 @@ export class AppController {
const res = body.data; const res = body.data;
// {status: true, data: string[], task_id: string} // {status: true, data: string[], task_id: string}
let resultUrl = `` let resultUrl = ``
if (res.status) { if (body.status) {
const data = res.data; const data = body.data;
if (!data) throw new Error(`结果有误`); if (!data) throw new Error(`结果有误`);
if (Array.isArray(data) && data.length > 0) { if (Array.isArray(data) && data.length > 0) {
resultUrl = data[0]; resultUrl = data[0];