refactor(study): 移除调试日志并优化视频时间获取逻辑

在ExamTest组件中移除已注释的调试日志
在courseDetail组件中增加视频元素存在性检查,避免潜在错误
This commit is contained in:
yindongqi 2025-08-15 14:08:17 +08:00
parent b6da6e8e3e
commit d904797db3
2 changed files with 6 additions and 2 deletions

View File

@ -590,7 +590,7 @@ export default {
},
mounted() {
console.log(this.loginInfo);
// console.log(this.loginInfo);
this.start();
},

View File

@ -357,8 +357,12 @@ export default {
//
function timer() {
// 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;
if (apartTime > 2 && _this.section[_this.choose_section_index].is_end != 1) {
document.getElementById("video").currentTime = _this.current_sign;