Quellcode durchsuchen

修改弹框bug

丸子 vor 8 Monaten
Ursprung
Commit
b9d40487fc

+ 4 - 2
src/components/videopage/DialogComponents.vue

@@ -542,6 +542,7 @@ $text-color: #483d8b; // 文本颜色:靛蓝色
   font-size: rpx(12);
   position: relative;
   display: flex;
+  text-align: left;
 
   .question-icon {
     background-color: $accent-color;
@@ -636,7 +637,7 @@ $text-color: #483d8b; // 文本颜色:靛蓝色
 // AI对话图标样式
 .ai-icon-container {
   position: absolute;
-  bottom: rpx(20);
+  bottom: rpx(10);
   right: rpx(20);
   display: flex;
   flex-direction: column;
@@ -883,10 +884,11 @@ $text-color: #483d8b; // 文本颜色:靛蓝色
 
 .child-dialog {
   border: none;
+  max-width: 45%;
   border-radius: rpx(15);
   background: rgb(255, 255, 255, 0.8); // 柔和的蓝紫色渐变
   overflow: hidden;
-  padding: rpx(5);
+  padding: rpx(10);
   position: relative;
 }
 

+ 7 - 4
src/components/videopage/VideoPlayer.vue

@@ -135,8 +135,8 @@ const handleTimeUpdate = (ev) => {
   // 触发父组件的时间更新事件
   emits('timeUpdate', { currentTime, progressPercentage })
 
-  if (!props.courseConfigList.length) return
-  props.courseConfigList.forEach(courseCofig => {
+   if (!props.courseConfigList.length) return
+    props.courseConfigList.forEach(courseCofig => {
     //暂停时间
     let time = courseCofig.ccTime
     // 检查是否到达时间点且还未暂停过
@@ -144,8 +144,11 @@ const handleTimeUpdate = (ev) => {
       videoRef.value.pause()
       // 记录暂停时间
       pausedIndices.value.push(currentTime)
-      // 触发父组件显示试题
-      emits('timeUpdate', { currentTime, progressPercentage, courseConfig: courseCofig })
+      // 只有当存在问题内容时才触发弹窗
+      if (courseCofig.ccQuestContent) {
+        // 触发父组件显示试题
+        emits('timeUpdate', { currentTime, progressPercentage, courseConfig: courseCofig })
+      }
     }
   })
 }