refactor(study): 移除调试日志并优化视频时间获取逻辑
在ExamTest组件中移除已注释的调试日志 在courseDetail组件中增加视频元素存在性检查,避免潜在错误
This commit is contained in:
parent
b6da6e8e3e
commit
d904797db3
@ -590,7 +590,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.loginInfo);
|
// console.log(this.loginInfo);
|
||||||
|
|
||||||
this.start();
|
this.start();
|
||||||
},
|
},
|
||||||
|
@ -357,8 +357,12 @@ export default {
|
|||||||
// 定时器
|
// 定时器
|
||||||
function timer() {
|
function timer() {
|
||||||
// console.log("被调用了");
|
// console.log("被调用了");
|
||||||
|
const video = document.getElementById("video");
|
||||||
|
let curTime;
|
||||||
|
if(video) {
|
||||||
|
curTime = video.currentTime;
|
||||||
|
}
|
||||||
|
|
||||||
let curTime = document.getElementById("video").currentTime;
|
|
||||||
let apartTime = curTime - _this.current_sign;
|
let apartTime = curTime - _this.current_sign;
|
||||||
if (apartTime > 2 && _this.section[_this.choose_section_index].is_end != 1) {
|
if (apartTime > 2 && _this.section[_this.choose_section_index].is_end != 1) {
|
||||||
document.getElementById("video").currentTime = _this.current_sign;
|
document.getElementById("video").currentTime = _this.current_sign;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user