mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 02:46:46 +08:00
提交
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user