瀏覽代碼

Merge branch 'master' of http://59.110.91.129:3000/zhangmengying/AIClass

丸子 9 月之前
父節點
當前提交
573d178050
共有 3 個文件被更改,包括 305 次插入87 次删除
  1. 214 1
      package-lock.json
  2. 1 0
      package.json
  3. 90 86
      src/views/AIDevelop.vue

+ 214 - 1
package-lock.json

@@ -19,6 +19,7 @@
         "jsencrypt": "^3.3.2",
         "markdown-it": "^14.1.0",
         "router": "^2.2.0",
+        "video.js": "^8.23.3",
         "vue": "^3.5.17",
         "vue-router": "^4.5.1",
         "vuex": "^4.0.2",
@@ -1426,6 +1427,15 @@
         "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0"
       }
     },
+    "node_modules/@babel/runtime": {
+      "version": "7.27.6",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz",
+      "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
     "node_modules/@babel/template": {
       "version": "7.27.2",
       "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.27.2.tgz",
@@ -2602,6 +2612,54 @@
       "integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==",
       "license": "MIT"
     },
+    "node_modules/@videojs/http-streaming": {
+      "version": "3.17.0",
+      "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-3.17.0.tgz",
+      "integrity": "sha512-Ch1P3tvvIEezeZXyK11UfWgp4cWKX4vIhZ30baN/lRinqdbakZ5hiAI3pGjRy3d+q/Epyc8Csz5xMdKNNGYpcw==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/vhs-utils": "^4.1.1",
+        "aes-decrypter": "^4.0.2",
+        "global": "^4.4.0",
+        "m3u8-parser": "^7.2.0",
+        "mpd-parser": "^1.3.1",
+        "mux.js": "7.1.0",
+        "video.js": "^7 || ^8"
+      },
+      "engines": {
+        "node": ">=8",
+        "npm": ">=5"
+      },
+      "peerDependencies": {
+        "video.js": "^8.19.0"
+      }
+    },
+    "node_modules/@videojs/vhs-utils": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-4.1.1.tgz",
+      "integrity": "sha512-5iLX6sR2ownbv4Mtejw6Ax+naosGvoT9kY+gcuHzANyUZZ+4NpeNdKMUhb6ag0acYej1Y7cmr/F2+4PrggMiVA==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.12.5",
+        "global": "^4.4.0"
+      },
+      "engines": {
+        "node": ">=8",
+        "npm": ">=5"
+      }
+    },
+    "node_modules/@videojs/xhr": {
+      "version": "2.7.0",
+      "resolved": "https://registry.npmjs.org/@videojs/xhr/-/xhr-2.7.0.tgz",
+      "integrity": "sha512-giab+EVRanChIupZK7gXjHy90y3nncA2phIOyG3Ne5fvpiMJzvqYwiTOnEVW2S4CoYcuKJkomat7bMXA/UoUZQ==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.5.5",
+        "global": "~4.4.0",
+        "is-function": "^1.0.1"
+      }
+    },
     "node_modules/@vitejs/plugin-legacy": {
       "version": "7.0.1",
       "resolved": "https://registry.npmmirror.com/@vitejs/plugin-legacy/-/plugin-legacy-7.0.1.tgz",
@@ -2841,6 +2899,15 @@
         }
       }
     },
+    "node_modules/@xmldom/xmldom": {
+      "version": "0.8.10",
+      "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
+      "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=10.0.0"
+      }
+    },
     "node_modules/acorn": {
       "version": "8.15.0",
       "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.15.0.tgz",
@@ -2854,6 +2921,18 @@
         "node": ">=0.4.0"
       }
     },
+    "node_modules/aes-decrypter": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-4.0.2.tgz",
+      "integrity": "sha512-lc+/9s6iJvuaRe5qDlMTpCFjnwpkeOXp8qP3oiZ5jsj1MRg+SBVUmmICrhxHvc8OELSmc+fEyyxAuppY6hrWzw==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/vhs-utils": "^4.1.1",
+        "global": "^4.4.0",
+        "pkcs7": "^1.0.4"
+      }
+    },
     "node_modules/argparse": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
@@ -3150,6 +3229,11 @@
         "node": ">=0.10"
       }
     },
+    "node_modules/dom-walk": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz",
+      "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="
+    },
     "node_modules/dunder-proto": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz",
@@ -3455,6 +3539,16 @@
         "node": ">= 0.4"
       }
     },
+    "node_modules/global": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz",
+      "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
+      "license": "MIT",
+      "dependencies": {
+        "min-document": "^2.19.0",
+        "process": "^0.11.10"
+      }
+    },
     "node_modules/gopd": {
       "version": "1.2.0",
       "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz",
@@ -3560,6 +3654,12 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/is-function": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz",
+      "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==",
+      "license": "MIT"
+    },
     "node_modules/is-glob": {
       "version": "4.0.3",
       "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",
@@ -3681,6 +3781,17 @@
         "yallist": "^3.0.2"
       }
     },
+    "node_modules/m3u8-parser": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-7.2.0.tgz",
+      "integrity": "sha512-CRatFqpjVtMiMaKXxNvuI3I++vUumIXVVT/JpCpdU/FynV/ceVw1qpPyyBNindL+JlPMSesx+WX1QJaZEJSaMQ==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/vhs-utils": "^4.1.1",
+        "global": "^4.4.0"
+      }
+    },
     "node_modules/magic-string": {
       "version": "0.30.17",
       "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz",
@@ -3788,12 +3899,52 @@
         "node": ">= 0.6"
       }
     },
+    "node_modules/min-document": {
+      "version": "2.19.0",
+      "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz",
+      "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
+      "dependencies": {
+        "dom-walk": "^0.1.0"
+      }
+    },
+    "node_modules/mpd-parser": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-1.3.1.tgz",
+      "integrity": "sha512-1FuyEWI5k2HcmhS1HkKnUAQV7yFPfXPht2DnRRGtoiiAAW+ESTbtEXIDpRkwdU+XyrQuwrIym7UkoPKsZ0SyFw==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/vhs-utils": "^4.0.0",
+        "@xmldom/xmldom": "^0.8.3",
+        "global": "^4.4.0"
+      },
+      "bin": {
+        "mpd-to-m3u8-json": "bin/parse.js"
+      }
+    },
     "node_modules/ms": {
       "version": "2.1.3",
       "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
       "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
       "license": "MIT"
     },
+    "node_modules/mux.js": {
+      "version": "7.1.0",
+      "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-7.1.0.tgz",
+      "integrity": "sha512-NTxawK/BBELJrYsZThEulyUMDVlLizKdxyAsMuzoCD1eFj97BVaA8D/CvKsKu6FOLYkFojN5CbM9h++ZTZtknA==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@babel/runtime": "^7.11.2",
+        "global": "^4.4.0"
+      },
+      "bin": {
+        "muxjs-transmux": "bin/transmux.js"
+      },
+      "engines": {
+        "node": ">=8",
+        "npm": ">=5"
+      }
+    },
     "node_modules/nanoid": {
       "version": "3.3.11",
       "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz",
@@ -3884,6 +4035,18 @@
         "url": "https://github.com/sponsors/jonschlinkert"
       }
     },
+    "node_modules/pkcs7": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/pkcs7/-/pkcs7-1.0.4.tgz",
+      "integrity": "sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@babel/runtime": "^7.5.5"
+      },
+      "bin": {
+        "pkcs7": "bin/cli.js"
+      }
+    },
     "node_modules/postcss": {
       "version": "8.5.6",
       "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.6.tgz",
@@ -3916,7 +4079,6 @@
       "version": "0.11.10",
       "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
       "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
-      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.6.0"
@@ -4316,6 +4478,57 @@
         "inherits": "2.0.3"
       }
     },
+    "node_modules/video.js": {
+      "version": "8.23.3",
+      "resolved": "https://registry.npmjs.org/video.js/-/video.js-8.23.3.tgz",
+      "integrity": "sha512-Toe0VLlDZcUhiaWfcePS1OEdT3ATfktm0hk/PELfD7zUoPDHeT+cJf/wZmCy5M5eGVwtGUg25RWPCj1L/1XufA==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@babel/runtime": "^7.12.5",
+        "@videojs/http-streaming": "^3.17.0",
+        "@videojs/vhs-utils": "^4.1.1",
+        "@videojs/xhr": "2.7.0",
+        "aes-decrypter": "^4.0.2",
+        "global": "4.4.0",
+        "m3u8-parser": "^7.2.0",
+        "mpd-parser": "^1.3.1",
+        "mux.js": "^7.0.1",
+        "videojs-contrib-quality-levels": "4.1.0",
+        "videojs-font": "4.2.0",
+        "videojs-vtt.js": "0.15.5"
+      }
+    },
+    "node_modules/videojs-contrib-quality-levels": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-4.1.0.tgz",
+      "integrity": "sha512-TfrXJJg1Bv4t6TOCMEVMwF/CoS8iENYsWNKip8zfhB5kTcegiFYezEA0eHAJPU64ZC8NQbxQgOwAsYU8VXbOWA==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "global": "^4.4.0"
+      },
+      "engines": {
+        "node": ">=16",
+        "npm": ">=8"
+      },
+      "peerDependencies": {
+        "video.js": "^8"
+      }
+    },
+    "node_modules/videojs-font": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-4.2.0.tgz",
+      "integrity": "sha512-YPq+wiKoGy2/M7ccjmlvwi58z2xsykkkfNMyIg4xb7EZQQNwB71hcSsB3o75CqQV7/y5lXkXhI/rsGAS7jfEmQ==",
+      "license": "Apache-2.0"
+    },
+    "node_modules/videojs-vtt.js": {
+      "version": "0.15.5",
+      "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.5.tgz",
+      "integrity": "sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "global": "^4.3.1"
+      }
+    },
     "node_modules/vite": {
       "version": "7.0.0",
       "resolved": "https://registry.npmmirror.com/vite/-/vite-7.0.0.tgz",

+ 1 - 0
package.json

@@ -20,6 +20,7 @@
     "jsencrypt": "^3.3.2",
     "markdown-it": "^14.1.0",
     "router": "^2.2.0",
+    "video.js": "^8.23.3",
     "vue": "^3.5.17",
     "vue-router": "^4.5.1",
     "vuex": "^4.0.2",

+ 90 - 86
src/views/AIDevelop.vue

@@ -1,6 +1,7 @@
 <template>
   <!-- AI发展历程 -->
   <div class="home-container">
+
     <!-- 展开收起侧边栏 -->
     <div
       class="icon-expand"
@@ -106,12 +107,13 @@
         </div>
         <div class="box-video">
           <video
-            class="full-box-video"
+            class="full-box-video video-js vjs-default-skin"
             :src="course.courseVideoPath"
             controlsList="nodownload"
             controls
             @timeupdate="handleTimeUpdate"
             @play="checkVideoPermission"
+            @seeked="handleSeeked"
             ref="videoRef"
           >
             <source :src="course.courseVideoPath" type="video/mp4" />
@@ -131,7 +133,7 @@
           <!-- 下一个视频 -->
           <div class="caret-right" @click="playNextVideo">
             <el-button type="warning" round
-              >下一节
+            >下一节
               <img :src="rightImg" alt="Right" />
             </el-button>
           </div>
@@ -262,7 +264,17 @@
 <script setup>
 import { ref, onMounted, onUnmounted, onBeforeUnmount,computed} from 'vue'
 import { useRouter } from 'vue-router'
-import { Expand, Fold, Memo } from '@element-plus/icons-vue'
+import videojs from 'video.js';
+import 'video.js/dist/video-js.css';
+import '@videojs/http-streaming'; // 支持HLS分片
+const videoPlayer = ref(null);
+let player = null;
+
+import {
+  Expand,
+  Fold,
+  Memo
+} from '@element-plus/icons-vue'
 import { Search, ArrowLeftBold } from '@element-plus/icons-vue'
 import {
   ElMessage,
@@ -299,6 +311,7 @@ const toggleDrawer = () => {
   drawerVisible.value = !drawerVisible.value
 }
 
+
 // 返回上一页
 const goBack = () => {
   router.go(-1)
@@ -318,11 +331,11 @@ const videoPathMap = ref({})
 
 //课程小节字典(需要新加接口调取字典)
 const menuDict = ref({
-  1: '课前回顾',
-  2: '课程引入',
-  3: '知识讲解',
-  4: '趣味实操',
-  5: '课程总结'
+  "1": "课前回顾",
+  "2": "课程引入",
+  "3": "知识讲解",
+  "4": "趣味实操",
+  "5": "课程总结",
 })
 
 // 渲染 课程数据结构 以及 视频
@@ -335,37 +348,44 @@ onMounted(async () => {
       console.log(res);
       courseList.value = res.data
       //课程数据
-      courseList.value.forEach((courseTemp, index) => {
-        let menuIndex = courseTemp.courseLabel + '-' + (index + 1)
-        // 填充大纲小节
-        let menu = menuItems.value.find(
-          menu => courseTemp.courseLabel === menu.index
-        )
-        if (menu) {
-          //小节
-          menu.children = menu.children || []
+      courseList.value.forEach((courseTemp,index) => {
+        let menuIndex = courseTemp.courseLabel + '-' + (index+1);
+        //填充大纲小节
+        let menu = menuItems.value.find(menu => courseTemp.courseLabel === menu.index);
+
+        if (menu){//小节
+          menu.children = menu.children || [];
           menu.children.push({
             key: menuIndex,
             index: menuIndex,
             title: courseTemp.courseName
           })
-        } else {
-          //大节
-          menuItems.value.push({
+        }else {//大节
+          let temp = {
             key: menuIndex,
             index: courseTemp.courseLabel,
             title: menuDict.value[courseTemp.courseLabel]
-          })
+          }
+          if (courseTemp.courseLabel === "3"){
+            temp.children = [{
+              key: menuIndex,
+              index: menuIndex,
+              title: courseTemp.courseName
+            }]
+          }
+          menuItems.value.push(temp)
         }
 
-        courseTemp['key'] = menuIndex
+        courseTemp["key"] = menuIndex;
         videoPathMap.value[menuIndex] = courseTemp
 
+
         //确定默认课程
         if (index === 0) {
-          course.value = courseTemp
+          course.value = courseTemp;
         }
       })
+
     } catch (error) {
       console.error('获取课程数据失败:', error)
     }
@@ -377,7 +397,7 @@ onMounted(async () => {
   }
   // 在视频元素上添加时间更新事件监听
   if (videoRef.value) {
-    // videoRef.value.addEventListener('timeupdate', onTimeUpdate)
+    videoRef.value.addEventListener('timeupdate', handleTimeUpdate)
   }
 })
 
@@ -388,7 +408,7 @@ const handleClose = () => {}
 // 菜单选择的处理函数
 const handleSelect = index => {
   //测试账号禁用视频
-  if (disableVideo(index)) return
+  if (disableVideo(index))return;
 
   const findTitle = items => {
     for (const item of items) {
@@ -409,9 +429,9 @@ const handleSelect = index => {
     course.value = videoPathMap.value[index]
     // 切换标题后,关闭抽屉
     drawerVisible.value = false
-  } else {
+  }else {
     //视频不存在
-    Message().notifyWarning('视频不存在!', true)
+    Message().notifyWarning('视频不存在!', true);
   }
 
   //测试账号禁用视频
@@ -437,7 +457,7 @@ const flattenMenuItems = () => {
 // 播放下一个视频
 const playNextVideo = () => {
   //测试账号禁用视频
-  if (disableVideo()) return
+  if (disableVideo())return;
 
   const allIndices = flattenMenuItems()
   const currentIndexInList = allIndices.indexOf(course.value.key)
@@ -453,16 +473,16 @@ const playNextVideo = () => {
   }
 
   // 重置
-  pausedIndices = ref({ time: [], newTime: [] })
-  userMessage = ref('')
-  messageHistory = ref([])
+  pausedIndices.value = [];
+  userMessage.value = ''
+  messageHistory.value = []
 }
 
 // 切换视频
 // 播放上一个视频
 const playPreviousVideo = () => {
   //测试账号禁用视频
-  if (disableVideo()) return
+  if (disableVideo())return;
 
   const allIndices = flattenMenuItems()
   const currentIndexInList = allIndices.indexOf(course.value.key)
@@ -481,7 +501,7 @@ const playPreviousVideo = () => {
 // 尝试播放视频,处理浏览器自动播放限制
 const tryPlayVideo = () => {
   //测试账号禁用视频
-  if (disableVideo()) return
+  if (disableVideo())return;
 
   const playPromise = videoRef.value.play()
   if (playPromise !== undefined) {
@@ -489,6 +509,16 @@ const tryPlayVideo = () => {
       console.error('视频播放失败,可能是浏览器自动播放限制:', error)
     })
   }
+  player = videojs(videoPlayer.value, {
+    controls: true,
+    sources: [
+      {
+        src: course.value.courseVideoPath,
+        type: 'video/mp4'
+      }
+    ],
+    preload:'metadata' // 仅加载元数据,避免预加载整个文件
+  });
 }
 
 // 检查视频播放权限
@@ -498,45 +528,31 @@ const checkVideoPermission = () => {
       videoRef.value.pause()
     }
   }
-  //记录已暂停的内容
-  setVideoStop()
-}
+};
 
 //禁用视频
 const disableVideo = (index = course.value.key) => {
-  let dis = [
-    '3-7',
-    '3-8',
-    '3-9',
-    '3-10',
-    '3-11',
-    '3-12',
-    '3-13',
-    '4-14',
-    '5-15'
-  ]
-
-  if (
-    localStorage.getItem('userName') === 'aiTest' &&
-    dis.indexOf(index) !== -1
-  ) {
+  let dis = ["3-7","3-8","3-9","3-10","3-11","3-12","3-13","4-14","5-15"]
+
+  if (localStorage.getItem('userName') === "aiTest" &&
+      dis.indexOf(index) !== -1) {
     if (videoRef.value) {
       // 记录当前播放时间
       videoRef.value.pause()
       // 阻止用户跳转到新的时间点,将播放时间重置为之前的时间
-      videoRef.value.currentTime = 0
+      videoRef.value.currentTime = 0;
     }
     //提示禁用// 显示消息框
-    Message().notifyWarning('您的账号并未开放此课程!', true)
-    return true
+    Message().notifyWarning('您的账号并未开放此课程!', true);
+    return true;
   }
-  return false
+  return false;
 }
 
 // 视频 ref
 const videoRef = ref(null)
 // 记录已经暂停过的时间点索引
-let pausedIndices = ref({ time: [], newTime: [] })
+let pausedIndices = ref([])
 // 试题弹框显示状态
 const questionDialogVisible = ref(false)
 // 当前显示的试题
@@ -560,17 +576,15 @@ const handleTimeUpdate = () => {
 
   if (!course.value.courseConfigList) return
   course.value.courseConfigList.forEach(courseCofig => {
+
     //暂停时间
     let time = courseCofig.ccTime
     // 检查是否到达时间点且还未暂停过
-    let timeIndex = pausedIndices.value.time.indexOf(time)
+    if (currentTime === time && !pausedIndices.value.includes(time) ) {
 
-    if (
-      currentTime === time &&
-      (timeIndex === -1 ||
-        Date.now() - pausedIndices.value.newTime[timeIndex] > 1000)
-    ) {
       videoRef.value.pause()
+      //记录暂停时间
+      pausedIndices.value.push(currentTime)
 
       // 显示对应的问题
       if (courseCofig.ccQuestContent) {
@@ -586,27 +600,16 @@ const handleTimeUpdate = () => {
   })
 }
 
+// 视频完成拖动进度条时触发的方法
+const handleSeeked = () => {
+  pausedIndices.value = [];
+}
+
 // 关闭试题弹框
 const handleCloseQuestionDialog = () => {
   questionDialogVisible.value = false
   // 继续播放视频
   videoRef.value.play()
-
-  //记录已暂停的内容
-  setVideoStop()
-}
-
-//记录已暂停的内容
-const setVideoStop = () => {
-  const currentTime = parseInt(videoRef.value.currentTime)
-  let timeIndex = pausedIndices.value.time.indexOf(currentTime)
-  if (timeIndex === -1) {
-    pausedIndices.value.time.push(currentTime)
-    pausedIndices.value.newTime.push(Date.now())
-  } else {
-    pausedIndices.value.time[timeIndex] = currentTime
-    pausedIndices.value.newTime[timeIndex] = Date.now()
-  }
 }
 
 // 提交答案
@@ -616,9 +619,6 @@ const handleSubmitAnswer = () => {
   // 继续播放视频
   videoRef.value.play()
   selectedOption.value = null
-
-  //记录已暂停的内容
-  setVideoStop()
 }
 
 // 发送消息
@@ -678,7 +678,7 @@ const SearchInput = ref('')
 const querySearch = (queryString, cb) => {
   const sections = getAllCourseSections();
   const results = queryString
-    ? sections.filter(section => 
+    ? sections.filter(section =>
         section.title.toLowerCase().includes(queryString.toLowerCase())
       )
     : sections;
@@ -829,6 +829,9 @@ $text-color: #483d8b; // 文本颜色:靛蓝色
 .el-menu ::v-deep(.el-sub-menu__title:hover .el-sub-menu__icon-arrow) {
   color: black; // 与悬停状态的文字颜色保持一致
 }
+.el-menu ::v-deep(.el-icon svg) {
+  font-size: rpx(9);
+}
 
 .mb-2 {
   color: white;
@@ -1007,6 +1010,7 @@ $text-color: #483d8b; // 文本颜色:靛蓝色
   height: rpx(300);
   video.full-box-video {
     height: rpx(280);
+    width: 67%;
     margin: 0 auto;
     border-radius: rpx(12);
     object-fit: cover;
@@ -1084,9 +1088,9 @@ video::-webkit-media-controls-panel {
     border: none;
     border-radius: rpx(20);
     background: linear-gradient(
-      135deg,
-      $light-color,
-      #d8bfd8
+            135deg,
+            $light-color,
+            #d8bfd8
     ); // 柔和的蓝紫色渐变
     overflow: hidden;
     display: flex; // 添加 flex 布局