mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 19:06:43 +08:00
提交事件发送修改
This commit is contained in:
@@ -236,25 +236,7 @@ export default {
|
||||
"scroll",
|
||||
this.handleScroll
|
||||
);
|
||||
let event = {
|
||||
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.$store.dispatch("userTrigger", event);
|
||||
this.setTimeCase = setTimeout(()=>{
|
||||
event.key = 'ReadCase';
|
||||
event.title = '阅读案例';
|
||||
event.content = '阅读了案例';
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
},1000 * 60 *3)
|
||||
|
||||
},
|
||||
beforeDestroy(){
|
||||
window.removeEventListener("scroll",this.handleScroll);
|
||||
@@ -263,7 +245,7 @@ export default {
|
||||
methods: {
|
||||
jumecase(item){
|
||||
this.$router.push({ path: './Detail.vue', query: { id: item.id } });
|
||||
|
||||
|
||||
},
|
||||
couresreso(){
|
||||
let key = 'case';
|
||||
@@ -291,6 +273,7 @@ export default {
|
||||
if (xmlhttp.status==200){
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 1;
|
||||
$this.sendEventData();
|
||||
}else{
|
||||
clearTimeout(timer);
|
||||
$this.Internet = 2;
|
||||
@@ -475,7 +458,31 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
sendEventData(){
|
||||
let event = {
|
||||
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.$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);
|
||||
},61000);//1分钟之后发送阅读案例事件
|
||||
},
|
||||
getCaseData() {
|
||||
let $this=this;
|
||||
apiCase.details(this.resolveId,true).then(res => {
|
||||
if (res.status == 200) {
|
||||
if (JSON.stringify(res.result) != '{}') {
|
||||
@@ -485,6 +492,7 @@ export default {
|
||||
if(this.caseDetail.filePath){
|
||||
//this.pdfPath=this.basePath+this.caseDetail.filePath;
|
||||
this.createPlayUrl(this.caseDetail.filePath);
|
||||
this.sendEventData();
|
||||
}else{
|
||||
this.$message.error('内容文件不存在或已被删除,请与管理员联系');
|
||||
}
|
||||
@@ -815,7 +823,7 @@ export default {
|
||||
.aligh-title{
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
|
||||
|
||||
}
|
||||
.ranking-data {
|
||||
margin: 10px 0;
|
||||
|
||||
@@ -502,6 +502,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
if(this.appendStudyOtherHandle!=null){
|
||||
windows.clearTimeout(this.appendStudyOtherHandle);
|
||||
}
|
||||
this.playerBoxShow = false;
|
||||
//显示内容部分
|
||||
this.$refs.mynote.showVideoTimeBtn(false);
|
||||
@@ -568,11 +571,6 @@
|
||||
//用户的学习时长,非音视频课程学习,单独的处理
|
||||
this.isAppendTime = false;
|
||||
|
||||
if(this.appendStudyOtherHandle!=null){
|
||||
windows.clearTimeout(this.appendStudyOtherHandle);
|
||||
}
|
||||
|
||||
|
||||
this.appendStudyOtherHandle = setTimeout(function() {
|
||||
$this.appendStudyOtherTime();
|
||||
}, 1000*60*2); //非音视频课程学习,2分钟后记录,因为一次记录是60秒
|
||||
|
||||
Reference in New Issue
Block a user