From 0b0125884c449378a2e80f888a43a2d20974c8df Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Thu, 03 Mar 2022 16:20:09 +0800
Subject: [PATCH] 完成碎碎念的整合

---
 src/components/mini/box13-reply.vue |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/components/mini/box13-reply.vue b/src/components/mini/box13-reply.vue
index c2b9810..3dfebf3 100644
--- a/src/components/mini/box13-reply.vue
+++ b/src/components/mini/box13-reply.vue
@@ -31,17 +31,19 @@
 					<a-textarea :rows="4" v-model="form.visitorContent" :placeholder="replyHolder" />
 				</a-form-item>
 				<div>
-					<a-button html-type="submit" type="primary" v-if="!showReplyMsgInfo" @click="send()"
-						:disabled="isSending">
-						高低整两句
-					</a-button>
-					<a-button html-type="submit" type="primary" v-else @click="send()" :disabled="isSending">
-						回复Ta
-					</a-button>
+						<a-button html-type="submit" type="primary" @click="send()" v-if="!showReplyMsgInfo"
+							:disabled="isSending || $attrs.isAllowedComment==0">
+							高低整两句
+						</a-button>
+						<a-button html-type="submit" type="primary" v-else @click="send()"
+							:disabled="isSending || $attrs.isAllowedComment==0">
+							回复Ta
+						</a-button>
+						<span class="myTip" v-if="$attrs.isAllowedComment==0">很遗憾,评论已关闭</span>
 				</div>
 
 				<div>
-					<a-checkbox style="margin-left: 8px;" v-if="!showReplyMsgInfo" v-model="form.isSecretMsg">
+					<a-checkbox style=" margin-left: 8px;" v-if="!showReplyMsgInfo" v-model="form.isSecretMsg">
 						悄悄说..<span class="myTip">(仅登录后可查看)</span>
 					</a-checkbox>
 					<!-- <a-checkbox v-model="form.isReceiveMail">
@@ -65,8 +67,7 @@
 				this.showReplyMsgInfo = true;
 				this.replyHolder = "@" + this.msgInfo.useName;
 			},
-			send(articleId) {
-				console.log(this.msgInfo);
+			send() {
 				if (this.form.nickName === "") {
 					this.$message.info("怎么称呼..")
 					return
@@ -87,7 +88,7 @@
 						res = false;
 					}
 				});
-
+				var articleId = this.$attrs.articleId;
 				let commentType = (articleId == null || articleId == undefined) ? 1 : 2;
 				this.isSending = true;
 
@@ -106,10 +107,9 @@
 					"commentContent": this.form.visitorContent,
 				}).then((res) => {
 					this.isSending = false;
-					console.log(111);
 					if (res.code == 200) {
-						console.log(111);
-						this.$message.info("已送达,审核通过后显示..")
+						this.$emit("sendMsg");
+						this.$message.info("信息已送达..")
 					} else {
 						this.$notification.error({
 							message: '好像哪里不对劲..',
@@ -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