mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
发送消息的统一调整
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
</div>
|
||||
<div class="comment-time portal-time">
|
||||
<showTime :time="com.sysCreateTime"></showTime>
|
||||
<interactBar :type="praisesType" :shares="false" :data="com" @addAnswers="showReply(com)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
|
||||
<interactBar :type="praisesType" :pageType="objType" :pageParams="objId" :shares="false" :data="com" @addAnswers="showReply(com)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
|
||||
</div>
|
||||
<div class="comment-btns">
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
</div>
|
||||
<div class="comment-time portal-time">
|
||||
<showTime :time="reply.sysCreateTime"></showTime>
|
||||
<interactBar :type="praisesType" :shares="false" :data="reply" @addAnswers="showReply(reply)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
|
||||
<interactBar :type="praisesType" :pageType="objType" :pageParams="objId" :shares="false" :data="reply" @addAnswers="showReply(reply)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
|
||||
</div>
|
||||
<div class="comment-btns">
|
||||
<!-- <a><svg-icon icon-class="like"></svg-icon><span>66</span></a> -->
|
||||
|
||||
@@ -174,11 +174,20 @@ export default {
|
||||
unicom:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
pageType:{
|
||||
type:Number,
|
||||
default:0
|
||||
},
|
||||
pageParams:{
|
||||
type:String,
|
||||
default:''
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
formatNum:formatUserNumber,
|
||||
msgPageType:0,
|
||||
loading:false,
|
||||
isPraise:false,
|
||||
isFavorite:false,
|
||||
@@ -222,6 +231,14 @@ export default {
|
||||
if(this.data && this.data.id && !this.readonly){
|
||||
this.checkHas();
|
||||
}
|
||||
|
||||
if(this.pageType==0){
|
||||
this.msgPageType=this.type;
|
||||
}else{
|
||||
this.msgPageType=this.pageType;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
addAnswers() {
|
||||
@@ -254,7 +271,7 @@ export default {
|
||||
content='提问'
|
||||
}
|
||||
if(this.type==5){
|
||||
content='回答'
|
||||
content='回答';
|
||||
}
|
||||
if(this.type==6){
|
||||
content='课程笔记'
|
||||
@@ -273,19 +290,27 @@ export default {
|
||||
content='案例评论'
|
||||
}
|
||||
// 评论点赞通知没有关联id,评论通知暂时关闭
|
||||
// 设置了主信息的关联,再把这个判断去掉
|
||||
if(this.type==60 || this.type==10 || this.type==20 || this.type==30 || this.type == 6) {
|
||||
return;
|
||||
// content=sendName+typeText+content
|
||||
} else {
|
||||
content=sendName+typeText+content+'-'+title
|
||||
//return;
|
||||
}
|
||||
|
||||
|
||||
if(title){
|
||||
content=sendName+typeText+content+'-'+title
|
||||
}else{
|
||||
content=sendName+typeText+content
|
||||
}
|
||||
let msgPageParams=this.pageParams;
|
||||
if(!msgPageParams){
|
||||
msgPageParams=this.data.id;
|
||||
}
|
||||
let message={
|
||||
content,
|
||||
refId,
|
||||
refType:this.type,
|
||||
source:1,
|
||||
pageType:this.msgPageType,
|
||||
pageParams:msgPageParams,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
sendName,
|
||||
@@ -400,9 +425,10 @@ export default {
|
||||
if(this.unicom) {
|
||||
this.$store.dispatch("unicomPraises",true)
|
||||
}
|
||||
if(this.type!=1&&this.type!=5){
|
||||
this.messageSave(this.data.id,this.data.title,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'点赞了我的');
|
||||
}
|
||||
//console.log('点选了我的 pageType='+this.msgPageType+','+this.pageParams)
|
||||
//if(this.type!=1&&this.type!=5){
|
||||
this.messageSave(this.data.id,this.data.title,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'点赞了我的');
|
||||
//}
|
||||
// if(this.type==5){
|
||||
// this.messageSave(this.data.id,this.data.content,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'评论了我的');
|
||||
// }
|
||||
@@ -520,9 +546,9 @@ export default {
|
||||
if(this.unicom) {
|
||||
this.$store.dispatch("unicomFavorites",true)
|
||||
}
|
||||
if(this.type===2||this.type===4){
|
||||
//if(this.type===2||this.type===4){
|
||||
this.messageSave(this.data.id,this.data.title,this.userInfo.name,this.data.sysCreateBy,this.data.sysCreateAid,'收藏了我发布的');
|
||||
}
|
||||
//}
|
||||
this.$message({message:'已加入收藏',type:'success'});
|
||||
//this.$emit('addFavorite',res.result);//添加收藏,如果是true代表添加成功,false代表已存在
|
||||
}else{
|
||||
@@ -632,13 +658,13 @@ export default {
|
||||
if(rs.result){
|
||||
$this.data.shares++;
|
||||
this.$message.success("分享成功")
|
||||
if(this.type!=3){
|
||||
//if(this.type!=3){
|
||||
if(this.type==1){
|
||||
this.messageSave(this.data.id,this.data.name,this.userInfo.name,curUser.name,curUser.aid,'分享给我的');
|
||||
}else{
|
||||
this.messageSave(this.data.id,this.data.title,this.userInfo.name,curUser.name,curUser.aid,'分享给我的');
|
||||
}
|
||||
}
|
||||
//}
|
||||
let event = {
|
||||
key: "Share",//分享
|
||||
title: "分享",//分享
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div class="comment-time portal-time">
|
||||
<showTime :time="com.sysCreateTime"></showTime>
|
||||
<interactBar :type="6" :shares="false" :data="com" @addAnswers="showReply(com)" :views="false" :comments="false" :answers="true"></interactBar>
|
||||
<interactBar :type="6" :pageType="1" :pageParams="objId" :shares="false" :data="com" @addAnswers="showReply(com)" :views="false" :comments="false" :answers="true"></interactBar>
|
||||
</div>
|
||||
<div v-if="replyInfo.parentId==com.id" class="comment-reply" style="padding-bottom: 5px;margin-top: 20px;">
|
||||
<div style="width:100%;display:flex;">
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<div class="comment-time portal-time">
|
||||
<showTime :time="reply.sysCreateTime"></showTime>
|
||||
<interactBar :type="60" :shares="false" :data="reply" @addAnswers="showReply(reply)" :views="false" :favorites="false" :comments="false" :answers="true"></interactBar>
|
||||
<interactBar :type="60" :pageType="1" :pageParams="objId" :shares="false" :data="reply" @addAnswers="showReply(reply)" :views="false" :favorites="false" :comments="false" :answers="true"></interactBar>
|
||||
</div>
|
||||
</div>
|
||||
<!--发布回复-->
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<!-- </el-card> -->
|
||||
<div style="margin-top:10px;">
|
||||
<interactBar :type="2" :data="articleDetailData" :theme='1' :shares="true" ></interactBar>
|
||||
<interactBar v-if="articleDetailData.id" :type="2" :data="articleDetailData" :theme='1' :shares="true" ></interactBar>
|
||||
</div>
|
||||
</div>
|
||||
<!--评论, 修改边距调整-->
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<div style="display:inline-block;">
|
||||
<interactBar :data="caseDetail" :type="3" :comments="false" :shares="true" :unicom="true"></interactBar>
|
||||
<interactBar v-if="caseDetail.id" :data="caseDetail" :type="3" :comments="false" :shares="true" :unicom="true"></interactBar>
|
||||
</div>
|
||||
<div style="display:inline-block;margin: 0 20px;">
|
||||
<i style="font-size: 25px;color:#6E7B84;" @click="goTop()" class="el-icon-arrow-up"></i>
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<div class="answer-time">
|
||||
<div> <!--之前显示时间的位置--> </div>
|
||||
<div style="margin-right: 10px;">
|
||||
<interactBar :type="5" :data="item" :comments="false" :shares="false" :views="false"></interactBar>
|
||||
<interactBar :type="5" :pageType="4" :pageParams="detailData.id" :data="item" :comments="false" :shares="false" :views="false"></interactBar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="answer-boot">
|
||||
|
||||
@@ -814,6 +814,8 @@
|
||||
refId:this.courseInfo.id,
|
||||
refType:1,
|
||||
source:1,
|
||||
pageType:1,
|
||||
pageParams:this.courseInfo.id,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
sendName:this.userInfo.name,
|
||||
|
||||
Reference in New Issue
Block a user