Эх сурвалжийг харах

修改蒙层及跳转逻辑

yangg 22 цаг өмнө
parent
commit
40925fa2bb

+ 14 - 0
pages/interview-question/interview-question.vue

@@ -32,6 +32,8 @@
           @ended="handleVideoEnded"
           @timeupdate="handleTimeUpdate">
         </video>
+        <!-- 添加透明蒙层 -->
+        <div class="video-overlay"></div>
          <div class="answer-button-container" v-if="showAnswerButton">
           <button class="answer-button" @click="handleAnswerButtonClick">
             开始提问
@@ -4560,6 +4562,18 @@ export default {
   align-items: center;
 }
 
+/* 添加视频蒙层样式 */
+.video-overlay {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background-color: transparent; /* 完全透明 */
+  z-index: 6; /* 确保在视频之上,但在按钮和字幕之下 */
+  pointer-events: auto; /* 允许捕获点击事件 */
+}
+
 /* 用户摄像头容器样式 */
 .user-camera-container {
   position: absolute;

+ 18 - 1
pages/posture-guide/posture-guide.vue

@@ -97,7 +97,24 @@ export default {
     handleConfirm() {
       if (this.isLastSlide) {
         uni.navigateTo({
-          url: '/pages/interview/interview'
+          url: '/pages/interview/interview',
+          success: () => {
+            console.log('跳转成功');
+          },
+          fail: (err) => {
+            console.error('跳转失败:', err);
+            // 如果 navigateTo 失败,尝试使用 redirectTo
+            uni.redirectTo({
+              url: '/pages/interview/interview',
+              fail: (redirectErr) => {
+                console.error('redirectTo 也失败了:', redirectErr);
+                uni.showToast({
+                  title: '页面跳转失败,请重试',
+                  icon: 'none'
+                });
+              }
+            });
+          }
         });
       } else {
         uni.showToast({

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/interview-question/interview-question.wxml


+ 12 - 0
unpackage/dist/dev/mp-weixin/pages/interview-question/interview-question.wxss

@@ -23,6 +23,18 @@
   align-items: center;
 }
 
+/* 添加视频蒙层样式 */
+.video-overlay.data-v-2a02c54e {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background-color: transparent; /* 完全透明 */
+  z-index: 6; /* 确保在视频之上,但在按钮和字幕之下 */
+  pointer-events: auto; /* 允许捕获点击事件 */
+}
+
 /* 用户摄像头容器样式 */
 .user-camera-container.data-v-2a02c54e {
   position: absolute;

+ 17 - 1
unpackage/dist/dev/mp-weixin/pages/posture-guide/posture-guide.js

@@ -54,7 +54,23 @@ const _sfc_main = {
     handleConfirm() {
       if (this.isLastSlide) {
         common_vendor.index.navigateTo({
-          url: "/pages/interview/interview"
+          url: "/pages/interview/interview",
+          success: () => {
+            console.log("跳转成功");
+          },
+          fail: (err) => {
+            console.error("跳转失败:", err);
+            common_vendor.index.redirectTo({
+              url: "/pages/interview/interview",
+              fail: (redirectErr) => {
+                console.error("redirectTo 也失败了:", redirectErr);
+                common_vendor.index.showToast({
+                  title: "页面跳转失败,请重试",
+                  icon: "none"
+                });
+              }
+            });
+          }
         });
       } else {
         common_vendor.index.showToast({

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно