提交消息的修改

This commit is contained in:
daihh
2022-11-11 10:05:02 +08:00
parent 27d1abbf39
commit 03f0a84c2d

View File

@@ -292,6 +292,7 @@
import assess from '@/components/Course/assess';
import myNote from '../../components/Course/myNote.vue';
import apiFollow from "@/api/phase2/userfollow.js";
import apiMessage from '@/api/system/message.js'
// import Vue from 'vue';
// Vue.forceUpdate();
export default {
@@ -800,6 +801,25 @@
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
//发送点赞消息
let firstTeacher=this.teachers[0];
let message={
content:this.userInfo.name+'点赞了我的课程-'+this.courseInfo.name,
refId:this.courseInfo.id,
refType:1,
source:1,
pageUrl:location.href,
sendAid:this.userInfo.aid,
sendName:this.userInfo.name,
acceptName:firstTeacher.teacherName,
acceptId:firstTeacher.teacherId,
title:'系统消息',
sendType:1,
conType:this.courseInfo.type,
}
apiMessage.save(message).then(res=>{
if(res.status!=200){ console.log('发送消息失败') }
})
} else {
this.$message.error('点赞失败,请稍后再试');
}