mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
他人主页留言
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user