This commit is contained in:
zhaofang
2022-11-15 11:22:29 +08:00
parent 991db2b971
commit dcf16210c8
5 changed files with 262 additions and 26 deletions

View File

@@ -110,7 +110,7 @@
item.checked = false;
this.message.list.push(item);
});
this.loadAuthorInfo(res.result.list,ids)
this.loadAuthorInfo(res.result.list,ids,0)
}
} else {
this.$refs.toast.show({ message: '获取数据失败', type: 'error' })
@@ -140,7 +140,7 @@
item.authorInfo={avatar:'',name:'',code:'',sex:null};
this.data.push(item)
})
this.loadAuthorInfo(res.result.list,ids);
this.loadAuthorInfo(res.result.list,ids,1);
}
}else{
this.$refs.interactToast.show({message:'加载@我的评论失败',type:'error'});
@@ -148,7 +148,7 @@
uni.hideLoading();
})
},
loadAuthorInfo(list, ids) {
loadAuthorInfo(list, ids,num) {
//加载作者信息,头像,机构信息
if (ids.length == 0) {
return;
@@ -159,10 +159,10 @@
if (res.status == 200) {
list.forEach((item, index) => {
res.result.some(author => {
if ($this.tab == 0 && author.aid == item.sendAid) {
if (num == 0 && author.aid == item.sendAid) {
item.authorInfo = author;
return true;
} else if($this.tab == 1 && author.aid == item.sysCreateAid){
} else if(num == 1 && author.aid == item.sysCreateAid){
item.authorInfo = author;
} else {
return false;