From af53664944a59c0e5e7c76fca6e48c58ffbcf21d Mon Sep 17 00:00:00 2001 From: du <13220750630.163.com> Date: 星期二, 15 四月 2025 17:10:31 +0800 Subject: [PATCH] 修改BUG --- easegen-front/src/views/myCourse/index.vue | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/easegen-front/src/views/myCourse/index.vue b/easegen-front/src/views/myCourse/index.vue index ed0ce38..b23cc8c 100644 --- a/easegen-front/src/views/myCourse/index.vue +++ b/easegen-front/src/views/myCourse/index.vue @@ -454,16 +454,15 @@ subtitleDialogVisible.value = true subtitleForm.videoId = videoId const videoDetail = await pptTemplateApi.myCourseDetail(videoId) - - // 绔嬪嵆鑾峰彇瑙嗛璇︽儏妫�鏌ュ瓧骞曠姸鎬� subtitleForm.subtitlesAddStatus=videoDetail.subtitlesAddStatus + console.log('瑙嗛璇︽儏:', videoDetail) if (videoDetail.subtitlesAddStatus === 2) { subtitleForm.videoUrl = videoDetail.videoUrl || '' generating.value=false polling.value=false - }else if (videoDetail.subtitlesAddStatus === 1) { + subtitleForm.videoUrl = '' generating.value=true polling.value=true } @@ -497,6 +496,7 @@ }else if (videoDetail.subtitlesStatus === 1) { generating.value=true polling.value=true + subtitleForm.content = '' } } catch (error) { console.error('鑾峰彇瑙嗛璇︽儏澶辫触:', error) @@ -555,7 +555,7 @@ const generateSubtitles = async () => { try { await subtitleFormRef.value.validateField(['timeThreshold', 'language']) - + console.log(subtitleForm) if (!subtitleForm.videoId) { message.warning('瑙嗛ID涓嶈兘涓虹┖') return @@ -569,8 +569,7 @@ lang: subtitleForm.language } await pptTemplateApi.generateSubtitles(params) - message.success('瀛楀箷鐢熸垚浠诲姟宸插紑濮�') - + message.success(subtitleForm.courseName+' '+'瀛楀箷鐢熸垚浠诲姟宸插紑濮�') const maxAttempts = 20000 const interval = 3000 let attempts = 0 @@ -596,13 +595,13 @@ } else if (videoDetail.subtitlesContent) { subtitleForm.content = videoDetail.subtitlesContent } - message.success('瀛楀箷鐢熸垚鎴愬姛') + message.success(subtitleForm.courseName+' '+'瀛楀箷鐢熸垚鎴愬姛') stopPolling() } else if (videoDetail.subtitlesStatus === 3) { // message.error(`瀛楀箷鐢熸垚澶辫触: ${videoDetail.errorReason || '鏈煡鍘熷洜'}`) stopPolling() } else if (attempts >= maxAttempts) { - message.warning('瀛楀箷鐢熸垚瓒呮椂锛岃绋嶅悗鎵嬪姩妫�鏌�') + message.warning(subtitleForm.courseName+' '+'瀛楀箷鐢熸垚瓒呮椂锛岃绋嶅悗鎵嬪姩妫�鏌�') stopPolling() } else { pollingTimer = window.setTimeout(poll, interval) @@ -620,7 +619,7 @@ poll() } catch (error) { - console.error('鐢熸垚瀛楀箷鍑洪敊:', error) + console.error(subtitleForm.courseName+' '+'鐢熸垚瀛楀箷鍑洪敊:', error) // message.error(`鐢熸垚瀛楀箷澶辫触: ${error.message || '鏈煡閿欒'}`) stopPolling() } finally { @@ -714,7 +713,7 @@ id: subtitleForm.videoId } await pptTemplateApi.videoMeger(obj) - message.success('瀛楀箷瑙嗛鍚堟垚浠诲姟宸插紑濮�') + message.success(subtitleForm.courseName+' '+'瀛楀箷瑙嗛鍚堟垚浠诲姟宸插紑濮�') const maxAttempts = 200000 const interval = 3000 @@ -729,7 +728,7 @@ console.log('杞瀛楀箷瑙嗛鍚堟垚缁撴灉:', videoDetail) if (videoDetail.subtitlesAddStatus === 2) { - message.success('瀛楀箷瑙嗛鍚堟垚鎴愬姛') + message.success(subtitleForm.courseName+' '+'瀛楀箷瑙嗛鍚堟垚鎴愬姛') if (videoDetail.previewUrl) { subtitleForm.content = '' // 娓呯┖褰撳墠瀛楀箷鍐呭 stopPolling() @@ -737,10 +736,10 @@ getList() // 鍒锋柊鍒楄〃 } } else if (videoDetail.subtitlesAddStatus === 3) { - message.error(`瀛楀箷瑙嗛鍚堟垚澶辫触: ${videoDetail.errorReason || '鏈煡鍘熷洜'}`) + message.error(subtitleForm.courseName+' '+`瀛楀箷瑙嗛鍚堟垚澶辫触: ${videoDetail.errorReason || '鏈煡鍘熷洜'}`) stopPolling() } else if (attempts >= maxAttempts) { - message.warning('瀛楀箷瑙嗛鍚堟垚瓒呮椂锛岃绋嶅悗鎵嬪姩妫�鏌�') + message.warning(subtitleForm.courseName+' '+'瀛楀箷瑙嗛鍚堟垚瓒呮椂锛岃绋嶅悗鎵嬪姩妫�鏌�') stopPolling() } else { pollingTimer = window.setTimeout(poll, interval) -- Gitblit v1.9.3