他人主页留言

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="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-img"><author-img :avatar="rep.authorInfo.avatar" :aid="rep.authorInfo.aid" :sex="rep.authorInfo.sex"></author-img></div>
<div class="li-text"> <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> <p>{{rep.content}}</p>
</div> </div>
<div class="li-right"> <div class="li-right">
@@ -162,7 +162,7 @@
res.result.list.forEach(item=>{ res.result.list.forEach(item=>{
item.replysList = []; item.replysList = [];
item.isReplys = false; item.isReplys = false;
item.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null } item.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null,sign:'' }
if(item.replys != '') { if(item.replys != '') {
item.replysList = JSON.parse(item.replys); item.replysList = JSON.parse(item.replys);
} }
@@ -189,24 +189,45 @@
}) })
}, },
getUserData(list) { getUserData(list) {
let ids = list.map(item=> item.aid); if(this.pageId == this.userInfo.aid) {
const noReapetIds = [...new Set(ids)]; let ids = list.map(item=> item.aid);
apiUser.getByIds(noReapetIds).then(res => { const noReapetIds = [...new Set(ids)];
if (res.status == 200) { apiUser.getByIds(noReapetIds).then(res => {
list.forEach((item, index) => { if (res.status == 200) {
res.result.some(author => { list.forEach((item, index) => {
if (author.aid == item.aid) { res.result.some(author => {
item.authorInfo = author; if (author.aid == item.aid) {
return true; item.authorInfo = author;
} else { return true;
return false; } else {
} return false;
}); }
}); });
} else { });
this.$message.error(res.message); } else {
} 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) { handleSizeChange(val) {
this.page.pageSize = val; this.page.pageSize = val;