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:
@@ -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('点赞失败,请稍后再试');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user