他人主页留言

This commit is contained in:
zhaofang
2022-10-18 19:12:47 +08:00
parent 18d31fffb0
commit 4e43296bf6

View File

@@ -34,7 +34,7 @@
<div class="lev-li">
<div class="li-img"><author-img :avatar="rep.authorInfo.avatar" :aid="rep.authorInfo.aid" :sex="rep.authorInfo.sex"></author-img></div>
<div class="li-text">
<p class="portal-title-tow">{{rep.authorInfo.name}} <span class="portal-summary-text">个性签名不要期待,不要假想</span></p>
<p class="portal-title-tow">{{rep.authorInfo.name}} <span class="portal-summary-text">个性签名{{rep.authorInfo.sign}}</span></p>
<p>{{rep.content}}</p>
</div>
<div class="li-right">
@@ -162,7 +162,7 @@
res.result.list.forEach(item=>{
item.replysList = [];
item.isReplys = false;
item.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null }
item.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null,sign:'' }
if(item.replys != '') {
item.replysList = JSON.parse(item.replys);
}
@@ -189,6 +189,7 @@
})
},
getUserData(list) {
if(this.pageId == this.userInfo.aid) {
let ids = list.map(item=> item.aid);
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(res => {
@@ -207,6 +208,26 @@
this.$message.error(res.message);
}
});
} else {
let ids = list.map(item=> item.sysCreateAid);
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(res => {
if (res.status == 200) {
list.forEach((item, index) => {
res.result.some(author => {
if (author.aid == item.sysCreateAid) {
item.authorInfo = author;
return true;
} else {
return false;
}
});
});
} else {
this.$message.error(res.message);
}
});
}
},
handleSizeChange(val) {
this.page.pageSize = val;