修改一个this指向问题

This commit is contained in:
daihh
2022-10-13 11:17:09 +08:00
parent ce6d39ef9b
commit b36afd7244

View File

@@ -402,6 +402,7 @@
}
});
//每一分钟保存一次
let $this=this;
this.appendStudyOtherHandle = setTimeout(function() {
$this.appendStudyOtherTime();
}, 1000*60);
@@ -570,7 +571,8 @@
if(this.appendStudyOtherHandle!=null){
windows.clearTimeout(this.appendStudyOtherHandle);
}
this.appendStudyOtherHandle = setTimeout(function() {
$this.appendStudyOtherTime();
}, 1000*60*2); //非音视频课程学习,2分钟后记录因为一次记录是60秒