From 57e3bead08715d72efaeffe90fafa179b8366473 Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Sat, 18 May 2024 12:02:14 +0800
Subject: [PATCH] 1.RSS更新 2.调整标签hover位置 3.font size

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

diff --git a/src/components/mini/box13-reply.vue b/src/components/mini/box13-reply.vue
index 8d8309d..4f08471 100644
--- a/src/components/mini/box13-reply.vue
+++ b/src/components/mini/box13-reply.vue
@@ -28,16 +28,12 @@
 				{{msgInfo.useName}}<span style="padding: 0px 3px;"> : </span>
 			</div>
 			<div>
-				<span v-html="msgInfo.userComment.replace(/\n/g, '<br>')"></span>
+				<span v-html="parseContent(msgInfo.userComment).replace(/\n/g, '<br>')"></span>
 			</div>
 		</div>
-		<a-comment>
+		<a-comment style="min-height: 320px;">
 			<div slot="content">
-				<a-form-item>
-					<a-textarea :rows="4" v-model="form.visitorContent" :placeholder="replyHolder"
-						class="OwO-textarea" />
-				</a-form-item>
-				<div class="OwO"></div>
+				<MyTextarea :content.sync="form.visitorContent" :replyHolder="replyHolder"></MyTextarea>
 
 				<div>
 					<a-button html-type="submit" type="primary" @click="send()" v-if="!showReplyMsgInfo"
@@ -71,25 +67,18 @@
 	} from '../../api/blogArticleComment.js'
 	import md5 from 'js-md5';
 
-	import 'owo/dist/OwO.min.css';
-	import OwO from 'owo/dist/OwO.min.js';
-	// import OwO from '/public/OWO.js';
-
-
-	const VisitorDataKey = "visitorData.inleft.com"
+	import MyTextarea from '../common/MyTextarea.vue'
+	import myConstant from "../../config/myConstant.js"
 
 	export default {
-		mounted() {
-			var OwO_demo = new OwO({
-				logo: 'OωO表情',
-				container: document.getElementsByClassName('OwO')[0],
-				target: document.getElementsByClassName('OwO-textarea')[0],
-				api: './OwO.json',
-				// api: 'http://diygod.github.io/OwO/demo/OwO.json',
-				position: 'down',
-				width: '100%',
-				maxHeight: '250px'
-			});
+		components: {
+			MyTextarea
+		},
+		props: {
+			parseContent: {
+				type: Function,
+				default: null
+			}
 		},
 		methods: {
 			getMsgInfo(param) {
@@ -126,7 +115,14 @@
 
 				if (this.form.nickName == 'inleft' || this.form.nickName == '笔墨' || this.form.nickName == '阿墨') {
 					if (this.form.authCode == null || this.form.authCode == "") {
-						this.$message.info("不要成为我,你就是真的自己..")
+						this.$message.info("此名称在这里使用需要正确的授权码..")
+						return
+					}
+				}
+
+				if (this.form.eMail == 'inleft@qq.com') {
+					if (this.form.authCode == null || this.form.authCode == "") {
+						this.$message.info("此邮箱在这里使用需要正确的授权码..")
 						return
 					}
 				}
@@ -148,7 +144,7 @@
 					this.form.visitorId = year + (month > 10 ? month : '0' + month) + date + num
 				}
 
-				localStorage.setItem(VisitorDataKey, JSON.stringify(this.form))
+				localStorage.setItem(this.VisitorDataKey, JSON.stringify(this.form))
 
 				this.isSending = true;
 				blogCommentAdd({
@@ -190,7 +186,7 @@
 		},
 
 		data() {
-			let tempVisitorData = localStorage.getItem(VisitorDataKey);
+			let tempVisitorData = localStorage.getItem(this.VisitorDataKey);
 			let vistorData = {
 				nickName: "",
 				eMail: "",
@@ -216,6 +212,7 @@
 			}
 
 			return {
+				VisitorDataKey: myConstant.VisitorDataKey,
 				isSending: false,
 				replyHolder: "",
 				msgInfo: {
@@ -245,7 +242,7 @@
 					"eMail": [{
 						trigger: 'blur',
 						pattern: /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/,
-						message: '你这邮箱有问题??'
+						message: '这邮箱格式?没见过呀..'
 					}, {
 						trigger: 'blur',
 						max: 50,
@@ -267,6 +264,12 @@
 </script>
 
 <style lang="less">
+	.replyMsgInfo img {
+		margin-bottom: -0.125rem;
+		img min-height: 3.5rem;
+		height: 2em;
+	}
+
 	.replyMsgInfo {
 		display: flex;
 		flex-direction: column;

--
Gitblit v1.9.1