留言板调整

This commit is contained in:
fan 2020-11-17 18:50:58 +08:00
parent 7962e74640
commit c53c744edc

View File

@ -47,7 +47,7 @@
</div> </div>
</template> </template>
</div> </div>
<div v-if="item.comments.total > 10 && moreMessageId != item.id" style="margin-top: 10px;"> <div v-if="item.comments.total > 3 && moreMessageId != item.id" style="margin-top: 10px;">
<span class="view_more" @click="viewMoreComment(item)">{{ `${item.comments.total}条回复,点击查看更多>>` }}</span> <span class="view_more" @click="viewMoreComment(item)">{{ `${item.comments.total}条回复,点击查看更多>>` }}</span>
</div> </div>
</div> </div>
@ -239,8 +239,8 @@ export default {
if (this.moreMessageId == messageId) { if (this.moreMessageId == messageId) {
this.allCommentList = resp.data; this.allCommentList = resp.data;
} }
if (resp.data.length > 10) { if (resp.data.length > 3) {
this.postCommentList[messageIndex].comments.list = resp.data.slice(0, 10); this.postCommentList[messageIndex].comments.list = resp.data.slice(0, 3);
this.postCommentList[messageIndex].comments.total = resp.data.length; this.postCommentList[messageIndex].comments.total = resp.data.length;
} else { } else {
this.postCommentList[messageIndex].comments.list = resp.data; this.postCommentList[messageIndex].comments.list = resp.data;