From e33959d3ca88b9fae5f6fe1048c8a1f7751e6f21 Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Wed, 02 Mar 2022 01:36:00 +0800
Subject: [PATCH] 完成评论页

---
 src/components/mini/box12-comment.vue |   41 +++++++++++++++++++++++++++++------------
 1 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/src/components/mini/box12-comment.vue b/src/components/mini/box12-comment.vue
index 23d1b54..c025ffe 100644
--- a/src/components/mini/box12-comment.vue
+++ b/src/components/mini/box12-comment.vue
@@ -3,7 +3,7 @@
 		<h1 style="text-align: center;">碎碎念</h1>
 		<replyBox ref="commentBoxId"></replyBox>
 		<a-modal v-model="visible" :title="replyTaget" :footer="null"
-			:bodyStyle="{'overflow':'overlay','maxHeight': '550px'}">
+			:bodyStyle="{'overflow':'overlay','maxHeight': '550px','scrollbarWidth': 'none'}">
 			<replyBox ref="replyBoxId"></replyBox>
 		</a-modal>
 
@@ -18,7 +18,7 @@
 							回复
 						</span>
 
-						<span @click="loadMore()">
+						<span @click="loadMore(temp)" v-if="temp.isHasNext==1">
 							<a-icon type="down" />更多..
 						</span>
 					</span>
@@ -31,22 +31,25 @@
 
 					<p slot="content">{{temp.commentContent}}</p>
 
-					<!-- <a-comment v-for="tempData in temp.replyList.listData">
+					<a-comment v-for="tempData in temp.replyList">
 						<span slot="actions" key="comment-nested-reply-to" @click="replyCall(tempData)">
 							<a-icon type="edit" />回复
 						</span>
 						<div slot="avatar">
 							<a :href="tempData.userHomePage" target="_blank" class="no-underline">
-								{{tempData.userName}}
+								{{tempData.visitorNickName}}
 							</a>
-							@<p style="display: inline;">{{tempData.replyUserName}} </p>:
+							@
 							<a :href="tempData.replyUserHomePage" target="_blank" class="no-underline">
 								{{tempData.replyUserName}} :
 							</a>
 						</div>
-						<p slot="content">{{tempData.userComment}}</p>
-					</a-comment> -->
+						<p slot="content">{{tempData.commentContent}}</p>
+					</a-comment>
 
+					<!-- <div class="loadMore" v-if="temp.isHasNext!=1">
+						<a-icon type="smile" /><span>到底了..</span>
+					</div> -->
 				</a-comment>
 			</div>
 		</div>
@@ -65,7 +68,8 @@
 	import replyBox from "./box13-reply.vue"
 
 	import {
-		queryBlogCommentList
+		queryBlogCommentList,
+		queryBlogCommentSubList
 	} from '../../api/blogArticleComment.js'
 
 	export default {
@@ -95,15 +99,23 @@
 					this.page.total = Number(res.data.total)
 					this.page.pageSize = Number(res.data.size);
 					this.commentListData = res.data.records;
-					return res
 				})
 			},
-			loadMore() {
-				this.$message.info("11")
+			loadMore(temp) {
+				temp.isHasNext = 0;
+
+				queryBlogCommentSubList({
+					commentId: temp.id
+				}).then((res) => {
+					if (res.data.length == temp.replyList.length) {
+						this.$message.info("没有更多了..")
+					}
+					temp.replyList = res.data;
+				})
 			},
 			replyCall(obj, replyId) {
 				this.visible = true;
-				this.replyTaget = "回复Ta @" + obj.userName;
+				this.replyTaget = "回复Ta @" + obj.visitorNickName;
 				var msgInfo = {
 					useName: obj.visitorNickName,
 					userComment: obj.commentContent,
@@ -211,6 +223,11 @@
 		user-select: none;
 	}
 
+	.ant-drawer-wrapper-body::-webkit-scrollbar,
+	.ant-modal-body::-webkit-scrollbar {
+		display: none;
+	}
+
 	.commentList {
 		a {
 			color: black;

--
Gitblit v1.9.1