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/group/MyPreviewModal.vue |    2 +-
 src/components/mini/box12-comment.vue   |   41 +++++++++++++++++++++++++++++------------
 src/components/mini/box13-reply.vue     |    3 ++-
 src/components/fixed/header.vue         |    2 +-
 src/api/blogArticleComment.js           |    8 ++++++++
 src/App.vue                             |    1 -
 6 files changed, 41 insertions(+), 16 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 6607565..0c6f8b7 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -50,7 +50,6 @@
 	}
 	
 	a {
-		color: #555;
 		position: relative;
 	}
 	
diff --git a/src/api/blogArticleComment.js b/src/api/blogArticleComment.js
index 7930b70..b6c64aa 100644
--- a/src/api/blogArticleComment.js
+++ b/src/api/blogArticleComment.js
@@ -26,3 +26,11 @@
 		params: parameter
 	})
 }
+
+export function queryBlogCommentSubList(parameter) {
+	return axios({
+		url: '/outside/blogComment/queryBlogCommentSubList',
+		method: 'get',
+		params: parameter
+	})
+}
diff --git a/src/components/fixed/header.vue b/src/components/fixed/header.vue
index 1c101af..7504258 100644
--- a/src/components/fixed/header.vue
+++ b/src/components/fixed/header.vue
@@ -4,7 +4,7 @@
 			<div class="menu">
 				<router-link to="/">Home</router-link>
 				<router-link to="/main2">乐谱搜索</router-link>
-				<router-link to="/main3">我的网盘</router-link>
+				<router-link to="/comment">碎碎念</router-link>
 				<router-link to="/link">友人帐</router-link>
 				<router-link to="/login">登录</router-link>
 				<!-- <router-link to="/comment">测试页</router-link> -->
diff --git a/src/components/group/MyPreviewModal.vue b/src/components/group/MyPreviewModal.vue
index 92ef70d..7fbf894 100644
--- a/src/components/group/MyPreviewModal.vue
+++ b/src/components/group/MyPreviewModal.vue
@@ -1,7 +1,7 @@
 <template>
 	<div class="myModal">
 		<a-modal v-model="visible" title="编辑预览"  width="60%" :footer="null"
-			:bodyStyle="{'overflow':'overlay','width': '100%','height': '100%'}">
+			:bodyStyle="{'overflow':'overlay','width': '100%','height': '700px'}">
 			<div style="display: flex;">
 				<a-textarea style="height: 750px;min-width: 50%" v-model="text"  />
 				<div class="markdown-body article-detail" style="min-width: 50%;border: 1px solid #d9d9d9;">
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;
diff --git a/src/components/mini/box13-reply.vue b/src/components/mini/box13-reply.vue
index c2b9810..4802fc3 100644
--- a/src/components/mini/box13-reply.vue
+++ b/src/components/mini/box13-reply.vue
@@ -193,8 +193,9 @@
 <style lang="less">
 	.replyMsgInfo {
 		display: flex;
+		border-radius: 4px;
 		box-shadow: 0px 9px 10px 0 rgba(0, 0, 0, 0.24), 1px 3px 15px 0 rgba(0, 0, 0, 0.19);
-		padding: 20px 20px;
+		padding: 20px 25px 20px;
 		margin-left: 15px;
 		margin-top: 10px;
 	}

--
Gitblit v1.9.1