lex-xin 7 月之前
父节点
当前提交
4b135f78ce
共有 3 个文件被更改,包括 6 次插入16 次删除
  1. 4 14
      src/views/exercise-after-class/index.tsx
  2. 1 1
      src/views/exercise-after-class/video-class.tsx
  3. 1 1
      vite.config.ts

+ 4 - 14
src/views/exercise-after-class/index.tsx

@@ -115,15 +115,8 @@ export default defineComponent({
             }
           }
         );
-        // data.expireTimeFlag = res.data?.expireTimeFlag || false;
         if (Array.isArray(res?.data)) {
           const trainings = res?.data || [];
-          //   const tempLessonTraining: any = [];
-          //   trainings.forEach((item: any) => {
-          //     tempLessonTraining.push(
-          //       ...(item.studentLessonTrainingDetails || [])
-          //     );
-          //   });
           // 没有播放完
           trainings.forEach((item: any) => {
             if (item.times > item.trainingTimes) {
@@ -143,9 +136,6 @@ export default defineComponent({
     const setRecord = async (trainings: any[], materialId?: any) => {
       if (Array.isArray(trainings)) {
         data.trainings = trainings.map((n: any) => {
-          // const materialRefs = n.materialRefs ? n.materialRefs : [];
-          // const materialMusicId =
-          //   materialRefs.length > 0 ? materialRefs[0].resourceId : null;
           return {
             ...n,
             // materialMusicId,
@@ -155,13 +145,13 @@ export default defineComponent({
             loop: false,
             videoEle: null,
             timer: null,
-            muted: n.useStatus === "LOCK" ? false : true, // 静音
-            // muted: true,
-            autoplay: n.useStatus === "LOCK" ? true : false //自动播放
+            muted: n.useStatus === "UNLOCK" ? false : true, // 静音
+            autoplay: n.useStatus === "UNLOCK" ? true : false //自动播放
           };
         });
+        
         data.itemList = data.trainings.filter(
-          (n: any) => n.id == materialId || route.query.materialId
+          (n: any) => n.id == (materialId || route.query.materialId)
         );
         data.videoData = data.itemList[0];
         if (data.disableScreenRecordingFlag === '1') {

+ 1 - 1
src/views/exercise-after-class/video-class.tsx

@@ -177,7 +177,7 @@ export default defineComponent({
             playsinline="false"
             preload="auto"
             class="player"
-            poster={iconVideobg}
+            // poster={iconVideobg}
             data-vid={item.value.id}
             src={item.value.content}
             // loop={item.value.loop}

+ 1 - 1
vite.config.ts

@@ -14,7 +14,7 @@ function resolve(dir: string) {
 }
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
-const proxyUrl = 'https://dev.gym.lexiaoya.cn';
+const proxyUrl = 'https://test.gym.lexiaoya.cn';
 export default defineConfig({
   base: './',
   plugins: [