mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
设置最大时长30分钟
This commit is contained in:
@@ -224,7 +224,7 @@ export default {
|
||||
orgData: [],
|
||||
setTimeCase: null,
|
||||
dataTime: sessionStorage.getItem('startTime') || 0,
|
||||
defaultMaxTime: 180,//最大时长
|
||||
defaultMaxTime: 1800,//最大时长
|
||||
cumulativeDuration:0,//累计时长
|
||||
};
|
||||
},
|
||||
@@ -333,6 +333,18 @@ export default {
|
||||
if (xmlhttp.status == 200) {
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 1;
|
||||
this.$store.dispatch("userTrigger", {
|
||||
key: "ViewCase",//后台的事件key 发布文章且审核通过
|
||||
title: '查看案例',//事件的标题
|
||||
parameters: "",//用户自定义参数 name:value,name:value
|
||||
content: '查看了案例',//事件的内容
|
||||
objId: this.resolveId,//关联的id
|
||||
objType: "3",//关联的类型
|
||||
objInfo: this.caseDetail.title,
|
||||
aid: this.userInfo.aid, //当前登录人的id
|
||||
aname: this.userInfo.name,//当前人的姓名
|
||||
status: 1 //状态,直接写1
|
||||
});
|
||||
$this.sendEventData();
|
||||
} else {
|
||||
clearTimeout(timer);
|
||||
@@ -529,10 +541,10 @@ export default {
|
||||
},
|
||||
sendEventData() {
|
||||
let event = {
|
||||
key: "ViewCase",//后台的事件key 发布文章且审核通过
|
||||
title: '查看案例',//事件的标题
|
||||
parameters: "",//用户自定义参数 name:value,name:value
|
||||
content: '查看了案例',//事件的内容
|
||||
key: "ReadCase",//后台的事件key 发布文章且审核通过
|
||||
title: '阅读案例',//事件的标题
|
||||
parameters: "second:60",//用户自定义参数 name:value,name:value
|
||||
content: '阅读了案例',//事件的内容
|
||||
objId: this.resolveId,//关联的id
|
||||
objType: "3",//关联的类型
|
||||
objInfo: this.caseDetail.title,
|
||||
@@ -540,13 +552,8 @@ export default {
|
||||
aname: this.userInfo.name,//当前人的姓名
|
||||
status: 1 //状态,直接写1
|
||||
}
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
let $this = this;
|
||||
this.setTimeCase = setTimeout(() => {
|
||||
event.key = 'ReadCase';
|
||||
event.title = '阅读案例';
|
||||
event.parameters = "second:60";
|
||||
event.content = '阅读了案例';
|
||||
$this.$store.dispatch("userTrigger", event);
|
||||
this.cumulativeDuration += 60
|
||||
if(this.cumulativeDuration<=this.defaultMaxTime){
|
||||
|
||||
Reference in New Issue
Block a user