From 97c01ace601a25388492b43472f20ea63aba108f Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 2 Dec 2022 14:22:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF=E7=9A=84?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Portal/comments.vue | 4 +-- src/components/Portal/interactBar.vue | 52 ++++++++++++++++++++------- src/components/Portal/noteComment.vue | 4 +-- src/views/portal/article/Detail.vue | 2 +- src/views/portal/case/Detail.vue | 2 +- src/views/portal/qa/Answer.vue | 2 +- src/views/study/coursenew.vue | 2 ++ 7 files changed, 48 insertions(+), 20 deletions(-) diff --git a/src/components/Portal/comments.vue b/src/components/Portal/comments.vue index 99a59e1c..54c9fd15 100644 --- a/src/components/Portal/comments.vue +++ b/src/components/Portal/comments.vue @@ -87,7 +87,7 @@
- +
@@ -135,7 +135,7 @@
- +
diff --git a/src/components/Portal/interactBar.vue b/src/components/Portal/interactBar.vue index 49a243f9..a97719d8 100644 --- a/src/components/Portal/interactBar.vue +++ b/src/components/Portal/interactBar.vue @@ -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: "分享",//分享 diff --git a/src/components/Portal/noteComment.vue b/src/components/Portal/noteComment.vue index 604b3a08..987f48ac 100644 --- a/src/components/Portal/noteComment.vue +++ b/src/components/Portal/noteComment.vue @@ -29,7 +29,7 @@
- +
@@ -65,7 +65,7 @@
- +
diff --git a/src/views/portal/article/Detail.vue b/src/views/portal/article/Detail.vue index 623d5b2b..c96cd69d 100644 --- a/src/views/portal/article/Detail.vue +++ b/src/views/portal/article/Detail.vue @@ -35,7 +35,7 @@
- +
diff --git a/src/views/portal/case/Detail.vue b/src/views/portal/case/Detail.vue index 06f9974f..44d620ac 100644 --- a/src/views/portal/case/Detail.vue +++ b/src/views/portal/case/Detail.vue @@ -78,7 +78,7 @@
- +
diff --git a/src/views/portal/qa/Answer.vue b/src/views/portal/qa/Answer.vue index cfe4c1e4..a2c57d8e 100644 --- a/src/views/portal/qa/Answer.vue +++ b/src/views/portal/qa/Answer.vue @@ -81,7 +81,7 @@
- +
diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index b0ae212d..666cb528 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -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,