From a63399d5cd494ec0f29eeb14d3e9b957f143e979 Mon Sep 17 00:00:00 2001 From: congzc Date: Wed, 5 Jul 2023 16:48:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E4=BC=B0=E6=97=B6=E9=95=BF=E5=8F=8A?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=A3=80=E6=B5=8B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/createVideo/index.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/createVideo/index.vue b/src/views/createVideo/index.vue index fd83c28..54fe26d 100644 --- a/src/views/createVideo/index.vue +++ b/src/views/createVideo/index.vue @@ -343,7 +343,7 @@ {{ item.name }} 🔊 @@ -1440,7 +1440,9 @@ async function saveOrUpdate(index, isSaveVideo) { createLoading.value = false; return; } - if (!audioData.value) { + if (!audioData.value && !afterSaveAudioId.value) { + console.log(audioData.value); + console.log(afterSaveAudioId.value); ElMessage.error( lanChange.value == "zh-cn" ? `请选择音频文件` @@ -1452,7 +1454,12 @@ async function saveOrUpdate(index, isSaveVideo) { try { const res1 = await uploadAudio(isSaveVideo); // 上传音频 } catch (error) { - ElMessage.error(error); + // ElMessage.error(error); + ElMessage.error( + lanChange.value == "zh-cn" + ? `生成失败,请重新选择音频` + : `Generation failed, please re-select the audio` + ); createLoading.value = false; } } @@ -1543,6 +1550,7 @@ async function findById(findId) { afterSaveAudioId.value = res.data.voiceMaterialId; //保存音频后得到的id imgUrl.value = res.data.personPhotoUrl; //图片回显 audioUrl.value = res.data.voiceMaterialUrl; // mp3回显 + musicItemAction.value = res.data.musicId; //音乐id回显 language.value = res.data.voiceInfo ? res.data.voiceInfo.languageId : null;