lex 1 year ago
parent
commit
5939d5d6d6
1 changed files with 7 additions and 1 deletions
  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)
       res.push(prev)
+      console.log(res, 'formatEffectiveTime')
 
 
       return formatEffectiveTimeToAfter(res)
       return formatEffectiveTimeToAfter(res)
     }
     }
@@ -86,13 +87,15 @@ export default defineComponent({
         if (item[0] >= startNode && item[1] < endNode) {
         if (item[0] >= startNode && item[1] < endNode) {
           effective.push([item[0], item[1]])
           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])
           effective.push([item[0], endNode])
         }
         }
         if (item[0] < startNode && item[1] > startNode && item[1] < endNode) {
         if (item[0] < startNode && item[1] > startNode && item[1] < endNode) {
           effective.push(startNode, item[1])
           effective.push(startNode, item[1])
         }
         }
       })
       })
+
+      console.log(effective, 'effective')
       return effective
       return effective
     }
     }
 
 
@@ -414,6 +417,9 @@ export default defineComponent({
           await updateStat()
           await updateStat()
           videoIntervalRef.counter.value = 0
           videoIntervalRef.counter.value = 0
         }, 10000)
         }, 10000)
+
+        const arr = [[0, 20]]
+        console.log(formatEffectiveTime(arr))
       } catch {
       } catch {
         //
         //
       }
       }