yangg 2 сар өмнө
parent
commit
ff898c07f2

+ 11 - 23
pages/identity-verify/identity-verify.vue

@@ -1270,33 +1270,21 @@ export default {
       
       
       // 检查录制时长
       // 检查录制时长
       const recordingDuration = this.getRecordingDuration();
       const recordingDuration = this.getRecordingDuration();
-      const minimumDuration = 3; // 最小录制时长(秒)
+      const minimumDuration = 5; // 最小录制时长(秒),从3秒改为5秒
       
       
       if (recordingDuration < minimumDuration) {
       if (recordingDuration < minimumDuration) {
         // 录制时间过短,显示提示
         // 录制时间过短,显示提示
-        uni.showModal({
-          title: '录制时间过短',
-          content: '您的回答时间过短,请至少录制' + minimumDuration + '秒。是否重新录制?',
-          confirmText: '重新录制',
-          cancelText: '仍然提交',
-          success: (res) => {
-            if (res.confirm) {
-              // 用户选择重新录制
-              console.log('用户选择重新录制');
-              // 重置录制状态但不停止当前录制
-              this.resetRecording();
-              return;
-            } else {
-              // 用户选择仍然提交,继续执行停止录制逻辑
-              console.log('用户选择继续提交短视频');
-              this.completeRecordingStop();
-            }
-          }
+        uni.showToast({
+          title: '录制时间过短,请至少录制5秒',
+          icon: 'none',
+          duration: 2000
         });
         });
-      } else {
-        // 录制时长足够,直接停止
-        this.completeRecordingStop();
+        // 不执行停止录制逻辑,继续录制
+        return;
       }
       }
+      
+      // 录制时长足够,直接停止
+      this.completeRecordingStop();
     },
     },
 
 
     // 添加新方法:获取录制时长
     // 添加新方法:获取录制时长
@@ -2500,7 +2488,7 @@ export default {
   overflow: hidden;
   overflow: hidden;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
   z-index: 20;
   z-index: 20;
-  border: 1px solid #eee;
+ 
 }
 }
 
 
 /* 用户摄像头视频样式 */
 /* 用户摄像头视频样式 */

+ 7 - 18
unpackage/dist/dev/mp-weixin/pages/identity-verify/identity-verify.js

@@ -886,27 +886,16 @@ const _sfc_main = {
     stopRecordingAnswer() {
     stopRecordingAnswer() {
       console.log("停止录制用户回答");
       console.log("停止录制用户回答");
       const recordingDuration = this.getRecordingDuration();
       const recordingDuration = this.getRecordingDuration();
-      const minimumDuration = 3;
+      const minimumDuration = 5;
       if (recordingDuration < minimumDuration) {
       if (recordingDuration < minimumDuration) {
-        common_vendor.index.showModal({
-          title: "录制时间过短",
-          content: "您的回答时间过短,请至少录制" + minimumDuration + "秒。是否重新录制?",
-          confirmText: "重新录制",
-          cancelText: "仍然提交",
-          success: (res) => {
-            if (res.confirm) {
-              console.log("用户选择重新录制");
-              this.resetRecording();
-              return;
-            } else {
-              console.log("用户选择继续提交短视频");
-              this.completeRecordingStop();
-            }
-          }
+        common_vendor.index.showToast({
+          title: "录制时间过短,请至少录制5秒",
+          icon: "none",
+          duration: 2e3
         });
         });
-      } else {
-        this.completeRecordingStop();
+        return;
       }
       }
+      this.completeRecordingStop();
     },
     },
     // 添加新方法:获取录制时长
     // 添加新方法:获取录制时长
     getRecordingDuration() {
     getRecordingDuration() {

+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/identity-verify/identity-verify.wxss

@@ -34,7 +34,6 @@
   overflow: hidden;
   overflow: hidden;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
   z-index: 20;
   z-index: 20;
-  border: 1px solid #eee;
 }
 }
 
 
 /* 用户摄像头视频样式 */
 /* 用户摄像头视频样式 */