From e45377e8f94faf25a98b9e5a645055b5fade4818 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Thu, 14 Jul 2022 15:52:29 +0800 Subject: [PATCH] 邮件回复样式更新 --- src/components/mini/box13-reply.vue | 39 +++++++++++++++++++-------------------- 1 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/components/mini/box13-reply.vue b/src/components/mini/box13-reply.vue index 4802fc3..17a3f63 100644 --- a/src/components/mini/box13-reply.vue +++ b/src/components/mini/box13-reply.vue @@ -8,7 +8,7 @@ </a-input> </a-form-model-item> <a-form-model-item label="邮箱" prop="eMail"> - <a-input v-model="form.eMail" placeholder="..仅后台可见"> + <a-input v-model="form.eMail" placeholder="保密项(非必填)"> </a-input> </a-form-model-item> <a-form-model-item label="主页" prop="homePage"> @@ -31,22 +31,24 @@ <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"> + <a-checkbox v-model="form.isReceiveMail"> 接收邮件回复通知 - </a-checkbox> --> + </a-checkbox> </div> </div> </a-comment> @@ -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; @@ -95,21 +96,19 @@ parentId: this.msgInfo.parentId, replyId: this.msgInfo.replyId, "visitorId": "1", - "isReceiveMail": 0, "articleId": articleId, "commentType": commentType, "authStatus": this.form.isSecretMsg ? 2 : 1, - // "isReceiveMail": this.form.isReceiveMail ? 1 : 0, + "isReceiveMail": this.form.isReceiveMail ? 1 : 0, "visitorEmail": this.form.eMail, "visitorHomePage": this.form.homePage, "visitorNickName": this.form.nickName, "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: '好像哪里不对劲..', @@ -169,7 +168,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, -- Gitblit v1.9.1