From d63119a801cfed11cda24c43779a04da0b56baae Mon Sep 17 00:00:00 2001 From: congzc Date: Thu, 17 Aug 2023 12:45:12 +0800 Subject: [PATCH] =?UTF-8?q?180=E7=A7=92=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/createVideo/index.vue | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/views/createVideo/index.vue b/src/views/createVideo/index.vue index b3f0b73..b6c8b52 100644 --- a/src/views/createVideo/index.vue +++ b/src/views/createVideo/index.vue @@ -491,8 +491,8 @@ {{ lanChange == "zh-cn" - ? `免费用户限制为60秒!` - : `Free user limit 60 seconds!` + ? `免费用户限制为${astrict}秒!` + : `Free user limit ${astrict} seconds!` }} @@ -528,8 +528,8 @@ {{ lanChange == "zh-cn" - ? `免费用户限制为60秒!` - : `Free user limit 60 seconds!` + ? `免费用户限制为${astrict}秒!` + : `Free user limit ${astrict} seconds!` }}

@@ -628,8 +628,8 @@ {{ lanChange == "zh-cn" - ? `免费用户限制为60秒!` - : `Free user limit 60 seconds!` + ? `免费用户限制为${astrict}秒!` + : `Free user limit ${astrict} seconds!` }}
@@ -1015,6 +1015,7 @@ function getImageBase64(blob) { const title = lanChange.value == "zh-cn" ? ref("未定义标题") : ref("Undefined Title"); + const astrict=180 //限制时长 //#region 上传图片 const imgUrl = ref(""); //图片回显路径 const imgData = ref(""); // 上传图片文件 @@ -1299,11 +1300,11 @@ const startRecording = async () => { clearInterval(getduration.value); return; } - if (duration.value >= 60) { + if (duration.value >= astrict) { ElMessage.error( lanChange.value == "zh-cn" - ? `免费用户录音时长限制为60秒!` - : `Free user recording duration is limited to 60 seconds!` + ? `免费用户录音时长限制为${astrict}秒!` + : `Free user recording duration is limited to ${astrict} seconds!` ); clearInterval(getduration.value); stopRecording(); @@ -1397,7 +1398,7 @@ const handleFileChange = async () => { // 进行大小时长限制 await countAudioTime(audio2); // 限制60秒 - if (uploadAudioTime.value > 60) { + if (uploadAudioTime.value > astrict) { ElMessage.error( lanChange.value == "zh-cn" ? `上传音频大小或者长度超出限制,请重新上传` @@ -1602,15 +1603,15 @@ async function saveOrUpdate(index, isSaveVideo) { saveLoading.value = false; return; } - if (res4.data.data > 60) { + if (res4.data.data > astrict) { ElMessage.error( lanChange.value == "zh-cn" ? `预计生成的视频时长约为${formatTime( res4.data.data - )},免费用户生成视频时长为60秒,无法生成视频` + )},免费用户生成视频时长为${astrict}秒,无法生成视频` : `The video generated is expected to be about ${formatTime( res4.data.data - )} long, and the free user-generated video is 60 seconds long and cannot be generated` + )} long, and the free user-generated video is ${astrict} seconds long and cannot be generated` ); createLoading.value = false; saveLoading.value = false; @@ -1899,7 +1900,7 @@ async function uploadMusic() { // 进行大小时长限制 await countAudioTime(audio2); // 限制60秒 - if (uploadAudioTime.value > 60) { + if (uploadAudioTime.value > astrict) { ElMessage.error( lanChange.value == "zh-cn" ? `上传音频大小或者长度超出限制,请重新上传`