Ver código fonte

sop一件群发订阅号

xw 3 dias atrás
pai
commit
e3600fa1d1
1 arquivos alterados com 31 adições e 11 exclusões
  1. 31 11
      src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

+ 31 - 11
src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

@@ -133,7 +133,7 @@
                       </el-card>
                     </div>
                     <el-input
-                      v-if="item.contentType == 1 || item.contentType == 15|| item.contentType == 13"
+                      v-if="item.contentType == 1 || item.contentType == 15"
                       v-model="item.value"
                       type="textarea"
                       :rows="3"
@@ -144,7 +144,7 @@
                     >
                     </el-input>
                     <el-link
-                      v-if="item.contentType == 1 || item.contentType == 15|| item.contentType == 13"
+                      v-if="item.contentType == 1 || item.contentType == 15"
                       type="primary"
                       @click="toggleSalesCall(index)"
                       style="margin-top: 10px;"
@@ -152,7 +152,7 @@
                       {{ item.isSalesCallAdded ? '移除#销售称呼#' : '添加#销售称呼#' }}
                     </el-link>
                     <el-link
-                      v-if="item.contentType == 1 || item.contentType == 15|| item.contentType == 13"
+                      v-if="item.contentType == 1 || item.contentType == 15"
                       type="primary"
                       @click="toggleSalesCallCustomer(index)"
                       style="margin-top: 10px;margin-left: 2%"
@@ -195,6 +195,19 @@
                         </el-form-item>
                       </el-card>
                     </div>
+                    <div v-if="item.contentType == 13">
+                      <el-card class="box-card">
+                        <el-form-item label="标题" prop="miniprogramTitle">
+                          <el-input v-model="item.miniprogramTitle" placeholder="请输入订阅号文章标题" />
+                        </el-form-item>
+                        <el-form-item label="封面" prop="miniprogramPicUrl">
+                          <ImageUpload v-model="item.miniprogramPicUrl" type="image" :num="10" :width="150" :height="150" />
+                        </el-form-item>
+                        <el-form-item label="文章链接" prop="articleUrl">
+                          <el-input v-model="item.articleUrl" placeholder="请输入订阅号文章链接" />
+                        </el-form-item>
+                      </el-card>
+                    </div>
                     <div v-if="item.contentType == 5 ">
 
                       <el-form-item label="上传文件:" prop="fileUrl" label-width="100px">
@@ -921,14 +934,6 @@ export default {
 
 
           if (this.msgForm.draftStrategy==1){
-
-          if(!!hasLiveSetting && (this.msgForm.courseId!=null && this.msgForm.courseId!='')){
-              return this.$message.error("直播间不能选取课程");
-          }
-          if(!!hasLiveSetting && (this.msgForm.videoId!=null && this.msgForm.videoId!='')){
-              return this.$message.error("直播间不能选取课节");
-          }
-
             this.msgForm.setting=JSON.stringify(this.setting)
 
         let jsonSetting = JSON.parse(this.msgForm.setting);
@@ -941,6 +946,12 @@ export default {
             }
             hasLiveSetting = true;
            }
+          }
+          if(!!hasLiveSetting && (this.msgForm.courseId!=null && this.msgForm.courseId!='')){
+              return this.$message.error("直播间不能选取课程");
+          }
+          if(!!hasLiveSetting && (this.msgForm.videoId!=null && this.msgForm.videoId!='')){
+              return this.$message.error("直播间不能选取课节");
           }
             if (this.setting.length <= 0) {
               return this.$message.error("请添加规则")
@@ -983,6 +994,15 @@ export default {
               if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
                 return this.$message.error("小程序封面地址不能为空")
               }
+              if ((this.setting[i].contentType == 13) && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
+                return this.$message.error("订阅号文章标题不能为空")
+              }
+              if ((this.setting[i].contentType == 13) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
+                return this.$message.error("订阅号文章封面不能为空")
+              }
+              if ((this.setting[i].contentType == 13) && (this.setting[i].articleUrl == null || this.setting[i].articleUrl == "")) {
+                return this.$message.error("订阅号文章链接不能为空")
+              }
 
               if (this.setting[i].contentType == 10 && (this.setting[i].miniprogramPage == null || this.setting[i].miniprogramPage == "")) {
                 return this.$message.error("小程序page地址不能为空")