Quellcode durchsuchen

1、调整一键群发福袋没选课程问题

yys vor 23 Stunden
Ursprung
Commit
db2bf408de
2 geänderte Dateien mit 17 neuen und 0 gelöschten Zeilen
  1. 10 0
      src/views/qw/sop/sop.vue
  2. 7 0
      src/views/qw/sopUserLogsInfo/sendMsgSopOpenTool.vue

+ 10 - 0
src/views/qw/sop/sop.vue

@@ -1903,6 +1903,13 @@ export default {
           }
           console.log(hasLiveSetting);
           // debugger;
+          const hasLuckyBagSetting = this.setting.some(item => Number(item.contentType) === 14)
+          if (hasLuckyBagSetting && (this.msgForm.courseId === null || this.msgForm.courseId === '')) {
+            return this.$message.error("发送福袋时课程不能为空,请选择课程")
+          }
+          if (hasLuckyBagSetting && (this.msgForm.videoId === null || this.msgForm.videoId === '')) {
+            return this.$message.error("发送福袋时课节不能为空,请选择课节")
+          }
           if ((this.msgForm.courseId===null || this.msgForm.courseId==='') && !hasLiveSetting){
             return this.$message.error("课程不能为空")
           }
@@ -1944,6 +1951,9 @@ export default {
             if (this.setting[i].contentType == 7 && (this.setting[i].value == null || this.setting[i].value == "")) {
               return this.$message.error("语音不能为空")
             }
+            if (this.setting[i].contentType == 14 && (this.setting[i].luckyBagId == null || this.setting[i].luckyBagId === "")) {
+              return this.$message.error("福袋不能为空")
+            }
             if(this.setting[i].contentType == 12 && (this.setting[i].liveId==null || this.setting[i].liveId == "")){
              return this.$message.error("直播间不能为空");
             }

+ 7 - 0
src/views/qw/sopUserLogsInfo/sendMsgSopOpenTool.vue

@@ -905,6 +905,13 @@ export default {
             if (this.setting.length <= 0) {
               return this.$message.error("请添加规则")
             }
+            const hasLuckyBagSetting = this.setting.some(item => Number(item.contentType) === 14)
+            if (hasLuckyBagSetting && !this.msgForm.courseId) {
+              return this.$message.error("发送福袋时课程不能为空,请选择课程")
+            }
+            if (hasLuckyBagSetting && !this.msgForm.videoId) {
+              return this.$message.error("发送福袋时课节不能为空,请选择课节")
+            }
             if (!hasLiveSetting && !this.msgForm.courseId && this.msgForm.liveId === null) {
               return this.$message.error("课程不能为空")
             }