hookehuyr

fix(UploadMedia): 添加视频时长超过60秒的限制检查

...@@ -211,6 +211,16 @@ const chooseMedia = () => { ...@@ -211,6 +211,16 @@ const chooseMedia = () => {
211 return; 211 return;
212 } 212 }
213 213
214 + // 检查视频长度(仅对视频进行60秒限制)
215 + if (file.fileType === 'video' && file.duration > 60) {
216 + Taro.showToast({
217 + title: '视频时长不能超过60秒',
218 + icon: 'none',
219 + duration: 2000
220 + });
221 + return;
222 + }
223 +
214 // 显示上传进度 224 // 显示上传进度
215 Taro.showLoading({ title: '上传中...' }); 225 Taro.showLoading({ title: '上传中...' });
216 226
......