|
|
@@ -209,14 +209,16 @@ export default { |
|
|
|
const res = await doCreateVideo(data); |
|
|
|
console.log(res, "生成视频"); |
|
|
|
Toast.success("提交成功!"); |
|
|
|
// *#06# |
|
|
|
setTimeout(() => { |
|
|
|
this.isShowCover = true; |
|
|
|
}, 2000); |
|
|
|
const timer = setInterval(() => { |
|
|
|
// 重复调取此接口直到videoStatus == 2 |
|
|
|
// 重复调取此接口直到videoStatus == 2 || 3 |
|
|
|
this.getVideo(this.id); |
|
|
|
if (this.timerOver) { |
|
|
|
clearInterval(timer); |
|
|
|
this.isShowCover = false; |
|
|
|
} |
|
|
|
}, 1000); |
|
|
|
} catch (error) { |
|
|
@@ -275,9 +277,9 @@ export default { |
|
|
|
this.timerOver = true; |
|
|
|
return; |
|
|
|
} else if (res.data.videoStatus == 3) { |
|
|
|
this.isShowCover = false; |
|
|
|
Toast.fail(`视频生成失败!失败原因:${res.data.videoMsg}`); |
|
|
|
this.timerOver = true; |
|
|
|
this.isShowCover = false; |
|
|
|
return; |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
@@ -298,6 +300,7 @@ export default { |
|
|
|
if (status == 1) { |
|
|
|
// 组装参数 |
|
|
|
const data = { |
|
|
|
id: this.id, |
|
|
|
...this.saveData, |
|
|
|
...this.soundParams, |
|
|
|
...this.backGroundParams, |
|
|
|