diff --git a/components/interact-fixed/interact-fixed.vue b/components/interact-fixed/interact-fixed.vue index 1b9ad02..3281027 100644 --- a/components/interact-fixed/interact-fixed.vue +++ b/components/interact-fixed/interact-fixed.vue @@ -218,6 +218,9 @@ export default { sendType:1, conType, content, + source:1, + pageUrl:location.href, + sendAid:this.userInfo.aid, } apiMessage.save(message).then(res=>{ if(res.status==200){ diff --git a/components/system-news/system-news.vue b/components/system-news/system-news.vue index 7533f30..5cd0187 100644 --- a/components/system-news/system-news.vue +++ b/components/system-news/system-news.vue @@ -13,7 +13,8 @@ - + + diff --git a/pages/news/index.vue b/pages/news/index.vue index 4014c56..1074de2 100644 --- a/pages/news/index.vue +++ b/pages/news/index.vue @@ -89,7 +89,6 @@ }, methods: { loadMessage() { - console.log('1111') this.queryMessage(true); }, queryMessage(flag) { @@ -105,23 +104,17 @@ this.message.total = res.result.count; if(res.result.list.length!=0){ res.result.list.forEach(item => { - // ids.push() + item.authorInfo={avatar:'',name:'',code:'',sex:null}; + ids.push(item.sendAid); item.checked = false; this.message.list.push(item); }); - // this.loadAuthorInfo(res.result.list,ids); - //设置已读 - // let ids=[]; - // for(let i=0;i{ - // if(res.status==200){ - - // } - // }) + this.loadAuthorInfo(res.result.list,ids) + } + if(this.message.list.length { if (res.status == 200) { list.forEach((item, index) => { res.result.some(author => { - if (author.aid == item.sysCreateAid) { + if ($this.tab == 0 && author.aid == item.sendAid) { item.authorInfo = author; return true; + } else if($this.tab == 1 && author.aid == item.sysCreateAid){ + item.authorInfo = author; } else { - return false; - } + return false; + } }); }); } else { diff --git a/pages/resource/qaDetail.vue b/pages/resource/qaDetail.vue index e406c34..0044b23 100644 --- a/pages/resource/qaDetail.vue +++ b/pages/resource/qaDetail.vue @@ -478,6 +478,9 @@ export default { sendType:1, conType, content, + source:1, + pageUrl:location.href, + sendAid:this.userInfo.aid, } apiMessage.save(message).then(res=>{ if(res.status==200){