修改消息记录信息

This commit is contained in:
daihh
2022-11-10 19:39:04 +08:00
parent 572a0f3b93
commit 9c2f18dd31
6 changed files with 51 additions and 16 deletions

View File

@@ -235,7 +235,6 @@ export default {
// if(type=='praise'){
// typeText='点赞了我的'
// }
let content;
let conType;
if(this.type==1){
@@ -283,6 +282,9 @@ export default {
content,
refId,
refType:this.type,
source:1,
pageUrl:location.href,
sendAid:this.userInfo.aid,
sendName,
acceptName,
acceptId,
@@ -291,9 +293,7 @@ export default {
conType,
}
apiMessage.save(message).then(res=>{
if(res.status==200){
}
if(res.status!=200){ console.log('发送消息失败') }
})
},
checkHas(){

View File

@@ -54,7 +54,7 @@
写文章
</div>
<div id="articleAnking">
<div class="portal-ranking ranking-bg">
<p class="ranking-title">贡献榜</p>
<ul class="ranking-data">
@@ -299,7 +299,19 @@ export default {
},
success(value){
let content=this.userInfo.name+'评论了我的文章'+'-'+this.articleDetailData.title;
let query={refId:this.articleDetailData.id,sendType:1,title:'系统消息',refType:2,content:content,sendName:this.userInfo.name,acceptId:this.articleDetailData.sysCreateAid,acceptName:this.articleDetailData.sysCreateBy}
let query={
refId:this.articleDetailData.id,
sendType:1,
title:'系统消息',
source:1,
pageUrl:location.href,
sendAid:this.userInfo.aid,
refType:2,
content:content,
sendName:this.userInfo.name,
acceptId:this.articleDetailData.sysCreateAid,
acceptName:this.articleDetailData.sysCreateBy,
}
apiMessage.save(query).then(res=>{
if(res.status==200){

View File

@@ -523,7 +523,19 @@ export default {
},
success(value){
let content=this.userInfo.name+'评论了我的案例'+'-'+this.caseDetail.title;
let query={refId:this.caseDetail.id,sendType:1,title:'系统消息',refType:3,content:content,sendName:this.userInfo.name,accpetId:this.caseDetail.sysCreateAid,acceptName:this.caseDetail.sysCreateBy}
let query={
refId:this.caseDetail.id,
sendType:1,
title:'系统消息',
refType:3,
source:1,
pageUrl:location.href,
sendAid:this.userInfo.aid,
content:content,
sendName:this.userInfo.name,
accpetId:this.caseDetail.sysCreateAid,
acceptName:this.caseDetail.sysCreateBy,
}
apiMessage.save(query).then(res=>{
if(res.status==200){

View File

@@ -449,6 +449,9 @@ export default {
let message = {
refId: this.detailData.id,
title: "系统消息",
source:1,
pageUrl:location.href,
sendAid:this.userInfo.aid,
sendName: this.userInfo.name,
acceptName: this.detailData.sysCreateBy,
acceptId: this.detailData.sysCreateAid,

View File

@@ -349,6 +349,9 @@ export default {
let message = {
refId: this.detailData.id,
title: "系统消息",
source:1,
pageUrl:location.href,
sendAid:this.userInfo.aid,
sendName: this.userInfo.name,
acceptName: this.detailData.sysCreateBy,
acceptId: this.detailData.sysCreateAid,

View File

@@ -293,17 +293,22 @@ export default {
// 跳转详情事件11
returnRouter(item) {
if (item.refType == 2) {
return this.webBaseUrl + '/article/detail?id=' + item.refId;
} else if (item.refType == 4||item.refType == 5) {
return this.webBaseUrl + '/qa/answer?id=' + item.refId;
} else {
// if (item.conType == 10) {
// return this.webBaseUrl + '/course/micro?id=' + item.refId;
// } else if (item.conType == 20) {
return this.webBaseUrl + '/course/detail?id=' + item.refId;
if(item.pageUrl && item.pageUrl.length>10){
return item.pageUrl;
}else{
// if (item.refType == 2) {
// return this.webBaseUrl + '/article/detail?id=' + item.refId;
// } else if (item.refType == 4||item.refType == 5) {
// return this.webBaseUrl + '/qa/answer?id=' + item.refId;
// } else {
// // if (item.conType == 10) {
// // return this.webBaseUrl + '/course/micro?id=' + item.refId;
// // } else if (item.conType == 20) {
// return this.webBaseUrl + '/course/detail?id=' + item.refId;
// // }
// }
}
}
}
};