lex 1 年之前
父節點
當前提交
5939d5d6d6
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/student/pre-register-active/video.tsx

+ 7 - 1
src/student/pre-register-active/video.tsx

@@ -69,6 +69,7 @@ export default defineComponent({
         }
       }
       res.push(prev)
+      console.log(res, 'formatEffectiveTime')
 
       return formatEffectiveTimeToAfter(res)
     }
@@ -86,13 +87,15 @@ export default defineComponent({
         if (item[0] >= startNode && item[1] < endNode) {
           effective.push([item[0], item[1]])
         }
-        if (item[0] >= startNode && item[1] >= endNode) {
+        if (item[0] >= startNode && item[1] > endNode) {
           effective.push([item[0], endNode])
         }
         if (item[0] < startNode && item[1] > startNode && item[1] < endNode) {
           effective.push(startNode, item[1])
         }
       })
+
+      console.log(effective, 'effective')
       return effective
     }
 
@@ -414,6 +417,9 @@ export default defineComponent({
           await updateStat()
           videoIntervalRef.counter.value = 0
         }, 10000)
+
+        const arr = [[0, 20]]
+        console.log(formatEffectiveTime(arr))
       } catch {
         //
       }