|
@@ -83,6 +83,7 @@ export default {
|
|
|
inviteCode: "",
|
|
inviteCode: "",
|
|
|
startTime: "",
|
|
startTime: "",
|
|
|
freeBrowse: true, // 默认自由浏览
|
|
freeBrowse: true, // 默认自由浏览
|
|
|
|
|
+ opertimer: null, // 定时器
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -222,8 +223,36 @@ export default {
|
|
|
console.log('自由浏览模式已切换为1:', this.freeBrowse);
|
|
console.log('自由浏览模式已切换为1:', this.freeBrowse);
|
|
|
this.$refs.ppt.contentWindow.PPTistStudent.toggleFollowMode()
|
|
this.$refs.ppt.contentWindow.PPTistStudent.toggleFollowMode()
|
|
|
},
|
|
},
|
|
|
|
|
+ setOperationTime() {
|
|
|
|
|
+ let _this = this;
|
|
|
|
|
+ if (_this.opertimer) {
|
|
|
|
|
+ clearInterval(_this.opertimer);
|
|
|
|
|
+ _this.opertimer = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ _this.opertimer = setInterval(() => {
|
|
|
|
|
+ _this.setoTime("600");
|
|
|
|
|
+ }, 600000);
|
|
|
|
|
+ },
|
|
|
|
|
+ setoTime(time) {
|
|
|
|
|
+ let params = [
|
|
|
|
|
+ {
|
|
|
|
|
+ uid: this.userid,
|
|
|
|
|
+ cid: this.id,
|
|
|
|
|
+ type: "2",
|
|
|
|
|
+ time: time,
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "addOperationTimeT2", params)
|
|
|
|
|
+ .then((res) => {})
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
destroyed() {
|
|
destroyed() {
|
|
|
|
|
+ clearInterval(this.opertimer);
|
|
|
|
|
+ this.opertimer = null;
|
|
|
if (this.courseDetail.userid == this.userid && this.tcid2 && this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840') {
|
|
if (this.courseDetail.userid == this.userid && this.tcid2 && this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840') {
|
|
|
let endTime = new Date().toLocaleString("zh-CN", {
|
|
let endTime = new Date().toLocaleString("zh-CN", {
|
|
|
hour12: false,
|
|
hour12: false,
|
|
@@ -248,6 +277,7 @@ export default {
|
|
|
}).replace(/\//g, "-")
|
|
}).replace(/\//g, "-")
|
|
|
this.getClassName()
|
|
this.getClassName()
|
|
|
this.getCourseDetail();
|
|
this.getCourseDetail();
|
|
|
|
|
+ this.setOperationTime();
|
|
|
window.onFreeBrowseChange = (value) => {
|
|
window.onFreeBrowseChange = (value) => {
|
|
|
this.freeBrowse = value;
|
|
this.freeBrowse = value;
|
|
|
console.log('自由浏览模式已切换为:', this.freeBrowse);
|
|
console.log('自由浏览模式已切换为:', this.freeBrowse);
|