fix: 修复数据格式错误
This commit is contained in:
parent
fd7d619a51
commit
4311527356
|
|
@ -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];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue