提交修改

This commit is contained in:
daihh
2022-11-03 10:25:07 +08:00
parent 7210c5c842
commit 768fdeaae8

View File

@@ -20,7 +20,7 @@
</div> </div>
<div class="comment-body" > <div class="comment-body" >
<div class="comment-info" @mouseover="showButtons(com.id)" @mouseout="hideButtons()"> <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="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 class="portal-summary-text" style="color: #666666;" v-html="displayAll(com)"></span>
<span v-if="com.content.length>170" @click="changeIsAll(com)"> <span v-if="com.content.length>170" @click="changeIsAll(com)">
@@ -57,7 +57,7 @@
</div> </div>
<div class="comment-body" @mouseover="showButtons(reply.id)" @mouseout="hideButtons()"> <div class="comment-body" @mouseover="showButtons(reply.id)" @mouseout="hideButtons()">
<div class="comment-info" > <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 class="portal-summary-text" style="color: #666666;" v-html="displayAll(reply)"></span>
<span v-if="reply.content.length>170" @click="changeIsAll(reply)"> <span v-if="reply.content.length>170" @click="changeIsAll(reply)">
{{reply.isAll?'收起':'全文'}} {{reply.isAll?'收起':'全文'}}
@@ -352,6 +352,7 @@
//item.sex=null; //item.sex=null;
allList.push(item); allList.push(item);
ids.push(item.sysCreateAid); ids.push(item.sysCreateAid);
//没有replyList
if(item.replyList && item.replyList!=''){ if(item.replyList && item.replyList!=''){
item.replyList.forEach(reply=>{ item.replyList.forEach(reply=>{
reply.answers=reply.replys; reply.answers=reply.replys;
@@ -373,23 +374,31 @@
id:item.id, id:item.id,
// author: this.author, // author: this.author,
} }
// console.log(item,'item'); //console.log(item,'item'); 去读取回复
//2022-11-2日与产品润博确认笔记回复只显示一级不显示二级: "value",
//直接修改后台,查询全部
apiComment.pageQuery(query).then(res=>{ 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 ids = [];
let allList=[];
res.result.list.forEach(it=>{ res.result.list.forEach(it=>{
ids.push(it.sysCreateAid); ids.push(it.sysCreateAid);
it.answers=it.replys;
it.replyList = []; it.replyList = [];
it.avatar=''; it.avatar='';
it.orgInfo=''; it.orgInfo='';
it.name=''; it.name='';
it.isAll=false; it.isAll=false;
}) allList.push(it);
// let ids = res.result.list.map(item=>item.sysCreateAid); //二级
});
//let ids = res.result.list.map(item=>item.sysCreateAid);
const noReapetIds=[...new Set(ids)] const noReapetIds=[...new Set(ids)]
this.loadAuthorInfo(res.result.list,noReapetIds); this.loadAuthorInfo(res.result.list,noReapetIds);
item.replyList.push(...res.result.list); //加载回复内容
} item.replyList.push(...res.result.list);
}
}) })
}); });
this.loadAuthorInfo(allList,ids); this.loadAuthorInfo(allList,ids);
@@ -544,11 +553,11 @@
// comment.replyList=[]; // comment.replyList=[];
// } // }
this.replyInfo.commentId=comment.id;
if(comment.replyList=='' || comment.replyList==null){ if(comment.replyList=='' || comment.replyList==null){
this.replyInfo.commentId=''; //this.replyInfo.commentId='';
}else{ }else{
this.replyInfo.commentId=comment.replyList[0].id; //this.replyInfo.commentId=comment.replyList[0].id;
this.replyInfo.clevel = 2; this.replyInfo.clevel = 2;
} }