|
|
@@ -296,7 +296,7 @@ import noteBox from "@/components/course/noteBox.vue";
|
|
|
import answerBox from "@/components/course/answerBox.vue";
|
|
|
import { mapGetters, mapMutations } from "vuex";
|
|
|
import { lockAction } from "../../utils/lock";
|
|
|
-import { debounce, reload } from "../../utils/common";
|
|
|
+import { debounce, throttle, reload } from "../../utils/common";
|
|
|
export default {
|
|
|
components: {
|
|
|
handoutsBox,
|
|
|
@@ -372,6 +372,7 @@ export default {
|
|
|
beforeHideIsPlaying: false,
|
|
|
isLeave: false,
|
|
|
text: "",
|
|
|
+ throttleFn: throttle(this.postStudyRecord, 15000),
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -459,7 +460,6 @@ export default {
|
|
|
lockAction();
|
|
|
this.lockTimer = setInterval(lockAction, 10000);
|
|
|
}
|
|
|
-
|
|
|
// 公众号模板消息的数据埋点
|
|
|
informId && this.clickOfficial(informId);
|
|
|
this.init();
|
|
|
@@ -1498,20 +1498,14 @@ export default {
|
|
|
}).then((res) => {});
|
|
|
},
|
|
|
timeupdate(time) {
|
|
|
- console.log("🚀 ~ file: detail.vue:1501 ~ timeupdate ~ time:", time);
|
|
|
if (this.noticeShow) {
|
|
|
this.refPlv.playPause();
|
|
|
return;
|
|
|
}
|
|
|
- newRecord(time);
|
|
|
+ this.throttleFn();
|
|
|
this.playTime = time;
|
|
|
this.timeEvent(time);
|
|
|
},
|
|
|
- newRecord(time) {
|
|
|
- return debounce(() => {
|
|
|
- console.log(1123123, time);
|
|
|
- }, 5000);
|
|
|
- },
|
|
|
playing() {
|
|
|
console.log("palying");
|
|
|
this.isPlaying = true;
|
|
|
@@ -1519,10 +1513,10 @@ export default {
|
|
|
this.postStudyRecord(0);
|
|
|
}
|
|
|
this.clearPauseTimer();
|
|
|
- this.studyTimer && clearInterval(this.studyTimer);
|
|
|
- this.studyTimer = setInterval(() => {
|
|
|
- this.postStudyRecord(0);
|
|
|
- }, 15000);
|
|
|
+ // this.studyTimer && clearInterval(this.studyTimer);
|
|
|
+ // this.studyTimer = setInterval(() => {
|
|
|
+ // this.postStudyRecord(0);
|
|
|
+ // }, 15000);
|
|
|
},
|
|
|
openCamera() {
|
|
|
console.log("拍照");
|