inleft
2022-07-14 e45377e8f94faf25a98b9e5a645055b5fade4818
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,
@@ -193,8 +192,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;
   }