Quellcode durchsuchen

180秒限制

dev
congzc vor 1 Jahr
Ursprung
Commit
d63119a801
1 geänderte Dateien mit 15 neuen und 14 gelöschten Zeilen
  1. +15
    -14
      src/views/createVideo/index.vue

+ 15
- 14
src/views/createVideo/index.vue Datei anzeigen

@@ -491,8 +491,8 @@
<img src="../../assets/img/tips.png" alt="" />
{{
lanChange == "zh-cn"
? `免费用户限制为60秒!`
: `Free user limit 60 seconds!`
? `免费用户限制为${astrict}秒!`
: `Free user limit ${astrict} seconds!`
}}
</div>
@@ -528,8 +528,8 @@
<img src="../../assets/img/tips.png" alt="" />
{{
lanChange == "zh-cn"
? `免费用户限制为60秒!`
: `Free user limit 60 seconds!`
? `免费用户限制为${astrict}秒!`
: `Free user limit ${astrict} seconds!`
}}
</div>
</p>
@@ -628,8 +628,8 @@
<img src="../../assets/img/tips.png" alt="" />
{{
lanChange == "zh-cn"
? `免费用户限制为60秒!`
: `Free user limit 60 seconds!`
? `免费用户限制为${astrict}秒!`
: `Free user limit ${astrict} seconds!`
}}
</div>
<div v-if="musicTabActive == 2" class="uploadVideo">
@@ -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"
? `上传音频大小或者长度超出限制,请重新上传`


Laden…
Abbrechen
Speichern