修改消息记录信息

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

View File

@@ -299,7 +299,19 @@ export default {
}, },
success(value){ success(value){
let content=this.userInfo.name+'评论了我的文章'+'-'+this.articleDetailData.title; 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=>{ apiMessage.save(query).then(res=>{
if(res.status==200){ if(res.status==200){

View File

@@ -523,7 +523,19 @@ export default {
}, },
success(value){ success(value){
let content=this.userInfo.name+'评论了我的案例'+'-'+this.caseDetail.title; 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=>{ apiMessage.save(query).then(res=>{
if(res.status==200){ if(res.status==200){

View File

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

View File

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

View File

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