mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
修改课程案例和文章时长
This commit is contained in:
@@ -541,22 +541,24 @@ export default {
|
||||
})
|
||||
},
|
||||
sendEventData() {
|
||||
let event = {
|
||||
key: "ReadCase",//后台的事件key 发布文章且审核通过
|
||||
title: '阅读案例',//事件的标题
|
||||
parameters: "second:" + this.secondTime,//用户自定义参数 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
|
||||
}
|
||||
let startTime = new Date().getTime();
|
||||
this.setTimeCase = setTimeout(() => {
|
||||
this.cumulativeDuration += this.secondTime
|
||||
let endTime = new Date().getTime();
|
||||
let totalTime = parseInt((endTime - startTime) / 1000);
|
||||
this.cumulativeDuration += totalTime
|
||||
if(this.cumulativeDuration <= this.defaultMaxTime){
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
this.$store.dispatch("userTrigger", {
|
||||
key: "ReadCase",//后台的事件key 发布文章且审核通过
|
||||
title: '阅读案例',//事件的标题
|
||||
parameters: "second:" + totalTime,//用户自定义参数 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.secondTime = 60
|
||||
this.sendEventData()
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user