| | |
| | | <a-input v-model="form.homePage" placeholder="https:// or http://"> |
| | | </a-input> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="马甲认证" |
| | | <a-form-model-item label="认证" |
| | | v-show="form.nickName=='inleft'||form.nickName=='笔墨'||form.nickName=='阿墨'"> |
| | | <a-input-password v-model="form.authCode" autocomplete='new-password' type="password" |
| | | placeholder="我的授权码"> |
| | | <a-icon slot="prefix" type="lock" style="color:rgba(0,0,0,.25)" /> |
| | | </a-input-password> |
| | | <a-input v-model="form.authCode" autocomplete='new-password' type="password" placeholder="我的授权码"> |
| | | </a-input> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </div> |
| | | |
| | | <div class="replyMsgInfo" v-if="showReplyMsgInfo"> |
| | | <div>{{msgInfo.useName}} </div> |
| | | <div style="padding: 0px 3px;"> : </div> |
| | | <div> |
| | | <span v-html="msgInfo.userComment.replace(/\n/g, '<br>')"></span> |
| | | {{msgInfo.useName}}<span style="padding: 0px 3px;"> : </span> |
| | | </div> |
| | | <div> |
| | | <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" /> |
| | | </a-form-item> |
| | | <MyTextarea :content.sync="form.visitorContent" :replyHolder="replyHolder"></MyTextarea> |
| | | |
| | | <div> |
| | | <a-button html-type="submit" type="primary" @click="send()" v-if="!showReplyMsgInfo" |
| | | :disabled="isSending || $attrs.isAllowedComment==0"> |
| | |
| | | <a-checkbox v-model="form.isReceiveMail"> |
| | | 接收邮件回复通知 |
| | | </a-checkbox> |
| | | <a-checkbox style=" margin-left: 8px;" v-if="!showReplyMsgInfo" v-model="form.isSecretMsg"> |
| | | <a-checkbox v-if="!showReplyMsgInfo" v-model="form.isSecretMsg"> |
| | | 悄悄说..<span class="myTip">(仅登录后可查看)</span> |
| | | </a-checkbox> |
| | | </div> |
| | | </div> |
| | | </a-comment> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | } from '../../api/blogArticleComment.js' |
| | | import md5 from 'js-md5'; |
| | | |
| | | const VisitorDataKey = "visitorData.inleft.com" |
| | | import MyTextarea from '../common/MyTextarea.vue' |
| | | import myConstant from "../../config/myConstant.js" |
| | | |
| | | export default { |
| | | components: { |
| | | MyTextarea |
| | | }, |
| | | props: { |
| | | parseContent: { |
| | | type: Function, |
| | | default: null |
| | | } |
| | | }, |
| | | methods: { |
| | | getMsgInfo(param) { |
| | | this.msgInfo = param; |
| | |
| | | |
| | | 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 |
| | | } |
| | | } |
| | |
| | | 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({ |
| | |
| | | }, |
| | | |
| | | data() { |
| | | let tempVisitorData = localStorage.getItem(VisitorDataKey); |
| | | let tempVisitorData = localStorage.getItem(this.VisitorDataKey); |
| | | let vistorData = { |
| | | nickName: "", |
| | | eMail: "", |
| | | homePage: "", |
| | | isReceiveMail: true, |
| | | isReceiveMail: false, |
| | | isSecretMsg: false, |
| | | visitorContent: "", |
| | | parentId: 0, |
| | |
| | | } |
| | | |
| | | return { |
| | | VisitorDataKey: myConstant.VisitorDataKey, |
| | | isSending: false, |
| | | replyHolder: "", |
| | | msgInfo: { |
| | |
| | | "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, |
| | |
| | | }], |
| | | "homePage": [{ |
| | | trigger: 'blur', |
| | | pattern: /^((https|http)?:\/\/)[^\s]+/, |
| | | message: '仅支持 https | http' |
| | | pattern: /^((https|http)?:\/\/)+/, |
| | | message: '仅支持 https:// | http://' |
| | | }, { |
| | | trigger: 'blur', |
| | | max: 50, |
| | |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | | .replyMsgInfo img { |
| | | margin-bottom: -0.125rem; |
| | | img min-height: 3.5rem; |
| | | height: 2em; |
| | | } |
| | | |
| | | .replyMsgInfo { |
| | | display: flex; |
| | | flex-direction: column; |
| | | 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 25px 20px; |
| | | margin-left: 15px; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .OwO { |
| | | padding: 0px 0px 20px 0px; |
| | | } |
| | | |
| | | .OwO .OwO-logo { |
| | | height: 30px; |
| | | } |
| | | |
| | | .OwO .quyin, |
| | | .OwO img { |
| | | margin-bottom: -0.125rem; |
| | | min-height: 3.5rem; |
| | | height: 1em; |
| | | } |
| | | </style> |