mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
提交修改
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="comment-body" >
|
||||
<div class="comment-info" @mouseover="showButtons(com.id)" @mouseout="hideButtons()">
|
||||
<div class="comment-content" @click="cancelReply()">
|
||||
<div class="comment-content" @click="cancelReply()">{{com.id}}
|
||||
<span class="play-time" v-if="com.playTime>0"><img :src="`${webBaseUrl}/images/coteplay.png`" alt=""> {{ getHMS(com.playTime) }}</span>
|
||||
<span class="portal-summary-text" style="color: #666666;" v-html="displayAll(com)"></span>
|
||||
<span v-if="com.content.length>170" @click="changeIsAll(com)">
|
||||
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
<div class="comment-body" @mouseover="showButtons(reply.id)" @mouseout="hideButtons()">
|
||||
<div class="comment-info" >
|
||||
<div class="comment-content" @click="cancelReply()">
|
||||
<div class="comment-content" @click="cancelReply()">{{reply.id}}
|
||||
<span class="portal-summary-text" style="color: #666666;" v-html="displayAll(reply)"></span>
|
||||
<span v-if="reply.content.length>170" @click="changeIsAll(reply)">
|
||||
{{reply.isAll?'收起':'全文'}}
|
||||
@@ -352,6 +352,7 @@
|
||||
//item.sex=null;
|
||||
allList.push(item);
|
||||
ids.push(item.sysCreateAid);
|
||||
//没有replyList
|
||||
if(item.replyList && item.replyList!=''){
|
||||
item.replyList.forEach(reply=>{
|
||||
reply.answers=reply.replys;
|
||||
@@ -373,23 +374,31 @@
|
||||
id:item.id,
|
||||
// author: this.author,
|
||||
}
|
||||
// console.log(item,'item');
|
||||
//console.log(item,'item'); 去读取回复
|
||||
//2022-11-2日与产品(润博)确认,笔记回复只显示一级,不显示二级: "value",
|
||||
//直接修改后台,查询全部
|
||||
apiComment.pageQuery(query).then(res=>{
|
||||
if(res.status == 200 && res.result.list.length > 0) {
|
||||
if(res.status == 200 && res.result.list.length > 0) {
|
||||
let ids = [];
|
||||
let allList=[];
|
||||
res.result.list.forEach(it=>{
|
||||
ids.push(it.sysCreateAid);
|
||||
it.answers=it.replys;
|
||||
it.replyList = [];
|
||||
it.avatar='';
|
||||
it.orgInfo='';
|
||||
it.name='';
|
||||
it.isAll=false;
|
||||
})
|
||||
// let ids = res.result.list.map(item=>item.sysCreateAid);
|
||||
allList.push(it);
|
||||
//二级
|
||||
|
||||
});
|
||||
//let ids = res.result.list.map(item=>item.sysCreateAid);
|
||||
const noReapetIds=[...new Set(ids)]
|
||||
this.loadAuthorInfo(res.result.list,noReapetIds);
|
||||
item.replyList.push(...res.result.list);
|
||||
}
|
||||
//加载回复内容
|
||||
item.replyList.push(...res.result.list);
|
||||
}
|
||||
})
|
||||
});
|
||||
this.loadAuthorInfo(allList,ids);
|
||||
@@ -544,11 +553,11 @@
|
||||
// comment.replyList=[];
|
||||
// }
|
||||
|
||||
|
||||
this.replyInfo.commentId=comment.id;
|
||||
if(comment.replyList=='' || comment.replyList==null){
|
||||
this.replyInfo.commentId='';
|
||||
//this.replyInfo.commentId='';
|
||||
}else{
|
||||
this.replyInfo.commentId=comment.replyList[0].id;
|
||||
//this.replyInfo.commentId=comment.replyList[0].id;
|
||||
this.replyInfo.clevel = 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user