| | |
| | | v-model="subtitleDialogVisible" |
| | | title="字幕查看修改" |
| | | width="60%" |
| | | @closed="resetSubtitleForm" |
| | | > |
| | | <el-form :model="subtitleForm" ref="subtitleFormRef"> |
| | | <el-row :gutter="20"> |
| | |
| | | await pptTemplateApi.generateSubtitles(params) |
| | | message.success('字幕生成任务已开始') |
| | | |
| | | const maxAttempts = 20 |
| | | const maxAttempts = 20000 |
| | | const interval = 3000 |
| | | let attempts = 0 |
| | | |
| | |
| | | message.success('字幕生成成功') |
| | | stopPolling() |
| | | } else if (videoDetail.subtitlesStatus === 3) { |
| | | message.error(`字幕生成失败: ${videoDetail.errorReason || '未知原因'}`) |
| | | // message.error(`字幕生成失败: ${videoDetail.errorReason || '未知原因'}`) |
| | | stopPolling() |
| | | } else if (attempts >= maxAttempts) { |
| | | message.warning('字幕生成超时,请稍后手动检查') |
| | |
| | | poll() |
| | | } catch (error) { |
| | | console.error('生成字幕出错:', error) |
| | | message.error(`生成字幕失败: ${error.message || '未知错误'}`) |
| | | // message.error(`生成字幕失败: ${error.message || '未知错误'}`) |
| | | stopPolling() |
| | | } finally { |
| | | generating.value = false |
| | |
| | | await pptTemplateApi.videoMeger(obj) |
| | | message.success('字幕视频合成任务已开始') |
| | | |
| | | const maxAttempts = 20 |
| | | const maxAttempts = 200000 |
| | | const interval = 3000 |
| | | let attempts = 0 |
| | | |