mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
案例和文章记录时长
This commit is contained in:
@@ -223,7 +223,9 @@ export default {
|
||||
Profess: [],
|
||||
orgData: [],
|
||||
setTimeCase: null,
|
||||
dataTime: sessionStorage.getItem('startTime') || 0
|
||||
dataTime: sessionStorage.getItem('startTime') || 0,
|
||||
defaultMaxTime: 180,//最大时长
|
||||
cumulativeDuration:0,//累计时长
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -545,6 +547,14 @@ export default {
|
||||
event.parameters = "second:60";
|
||||
event.content = '阅读了案例';
|
||||
$this.$store.dispatch("userTrigger", event);
|
||||
this.cumulativeDuration += 60
|
||||
if(this.cumulativeDuration<=this.defaultMaxTime){
|
||||
sendEventData()
|
||||
}else{
|
||||
this.cumulativeDuration = 0
|
||||
clearInterval(this.setTimeCase);
|
||||
this.setTimeCase = null
|
||||
}
|
||||
}, 61000);//1分钟之后发送阅读案例事件
|
||||
},
|
||||
getCaseData() {
|
||||
|
||||
Reference in New Issue
Block a user