yuhongqi пре 7 часа
родитељ
комит
30f60a608b

+ 2 - 1
src/views/qw/sopLogs/sopLogsList.vue

@@ -199,6 +199,7 @@
                 <span v-if="item.contentType == 18 || item.contentType == 19"><el-button size="mini" type="primary" @click="generateLiveShortLink(item)" style="margin-left: 330px;">复制短链</el-button></span>
                 <span v-if="item.contentType == 21">发看课短信</span>
                 <span v-if="item.contentType == 23">APP看课跳转短链</span>
+                <span v-if="item.contentType == 20">APP直播</span>
                 <span v-if="item.contentType == 24">APP直播跳转短链</span>
               </div>
               <div v-if="item.sendStatus">
@@ -232,7 +233,7 @@
                 </div>
               </div>
             </div>
-            <div v-if="item.contentType == 4 || item.contentType == 10 || item.contentType == 18 || item.contentType == 17 || item.contentType == 23 || item.contentType == 24" class="message-style">
+            <div v-if="item.contentType == 4 || item.contentType == 10 || item.contentType == 18 || item.contentType == 17 || item.contentType == 20 || item.contentType == 23 || item.contentType == 24" class="message-style">
                 <div style="display: flex; justify-content: space-between; width: 100%">
                   <span style="font-size: 13px; flex: 1">{{ item.miniprogramTitle }}</span>
                   <el-image

+ 43 - 1
src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

@@ -309,6 +309,36 @@
                         </el-form-item>
                       </el-card>
                     </div>
+                    <div v-if="item.contentType == 20">
+                      <el-card class="box-card">
+                        <el-form-item label="直播间" >
+                          <el-select  v-model="item.liveId"
+                                      placeholder="请选择直播间" size="mini"
+                                      @change="liveChange(item)" >
+                            <el-option
+                              v-for="dict in liveList"
+                              :key="dict.liveId"
+                              :label="dict.liveName"
+                              :value="dict.liveId"
+                            />
+                          </el-select>
+                        </el-form-item>
+
+                        <el-form-item label="标题" prop="miniprogramTitle">
+                          <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字节" :rows="2" maxlength="64"
+                                    type="textarea"   @input="checkLiveMiniprogramTitle(item)"/>
+                        </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="appid" prop="miniprogramAppid" v-show="false">
+                          <el-input v-model="item.miniprogramAppid='wxcfd4cd6e2375e42f' " disabled />
+                        </el-form-item>
+                        <el-form-item label="page路径" prop="miniprogramPage"  v-show="false" label-width="100px" style="margin-left: -30px">
+                          <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径"  disabled />
+                        </el-form-item>
+                      </el-card>
+                    </div>
                     <div v-if="item.contentType == 14">
                       <el-card class="box-card">
                         <el-form-item label="福袋名称" >
@@ -569,6 +599,9 @@ export default {
       }
     },
 
+    checkLiveMiniprogramTitle(item) {
+      this.$forceUpdate();
+    },
     liveChange(content) {
       // content.liveId 是选中的直播间 ID(liveId)
       const selectedLive = this.liveList.find(live => live.liveId === content.liveId);
@@ -1001,7 +1034,7 @@ export default {
             let hasLiveSetting = false;
             console.log(jsonSetting)
             for (let index = 0; index < jsonSetting.length; index++) {
-              if (!!jsonSetting[index] && (jsonSetting[index].contentType == "12" || jsonSetting[index].contentType == "18" || jsonSetting[index].contentType == "19")) {
+              if (!!jsonSetting[index] && (jsonSetting[index].contentType == "12" || jsonSetting[index].contentType == "18" || jsonSetting[index].contentType == "19" || jsonSetting[index].contentType == "20")) {
                 if (!!hasLiveSetting) {
                   return this.$message.error("发送直播间只能一次只能发送一条");
                 }
@@ -1070,6 +1103,15 @@ export default {
               if ((this.setting[i].contentType == 12 || this.setting[i].contentType == 24) && (this.setting[i].liveId == null || this.setting[i].liveId == "")) {
                 return this.$message.error("直播间不能为空");
               }
+              if (this.setting[i].contentType == 20 && (this.setting[i].liveId == null || this.setting[i].liveId == "")) {
+                return this.$message.error("直播间不能为空");
+              }
+              if (this.setting[i].contentType == 20 && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
+                return this.$message.error("标题不能为空");
+              }
+              if (this.setting[i].contentType == 20 && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
+                return this.$message.error("封面不能为空");
+              }
               // 短信模板验证
               if (this.setting[i].contentType == 21 && (this.setting[i].smsTemplateId == null || this.setting[i].smsTemplateId === "")) {
                 return this.$message.error("短信模板不能为空")

+ 43 - 1
src/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue

@@ -439,6 +439,36 @@
                         </el-form-item>
                       </el-card>
                     </div>
+                    <div v-if="item.contentType == 20">
+                      <el-card class="box-card">
+                        <el-form-item label="直播间" >
+                          <el-select  v-model="item.liveId"
+                                      placeholder="请选择直播间" size="mini"
+                                      @change="liveChange(item)" >
+                            <el-option
+                              v-for="dict in liveList"
+                              :key="dict.liveId"
+                              :label="dict.liveName"
+                              :value="dict.liveId"
+                            />
+                          </el-select>
+                        </el-form-item>
+
+                        <el-form-item label="标题" prop="miniprogramTitle">
+                          <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字节" :rows="2" maxlength="64"
+                                    type="textarea"    @input="checkLiveMiniprogramTitle(item)" />
+                        </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="appid" prop="miniprogramAppid" v-show="false">
+                          <el-input v-model="item.miniprogramAppid='wxcfd4cd6e2375e42f' " disabled />
+                        </el-form-item>
+                        <el-form-item label="page路径" prop="miniprogramPage"  v-show="false" label-width="100px" style="margin-left: -30px">
+                          <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径"  disabled />
+                        </el-form-item>
+                      </el-card>
+                    </div>
                     <div v-if="item.contentType == 8">
                       <el-button type="primary"
                                  style="margin-bottom: 1%"
@@ -828,6 +858,9 @@ export default {
       }
     },
 
+    checkLiveMiniprogramTitle(item) {
+      this.$forceUpdate();
+    },
     liveChange(content) {
       // content.liveId 是选中的直播间 ID(liveId)
       const selectedLive = this.liveList.find(live => live.liveId === content.liveId);
@@ -1476,7 +1509,7 @@ export default {
           let hasLiveSetting = false;
           let jsonSetting = JSON.parse(this.msgForm.setting);
           for(let index=0;index < jsonSetting.length;index++){
-           if(!!jsonSetting[index] && (jsonSetting[index].contentType == "12") ) {
+           if(!!jsonSetting[index] && (jsonSetting[index].contentType == "12" || jsonSetting[index].contentType == "20") ) {
             if(!!hasLiveSetting){
                return this.$message.error("发送直播间只能一次只能发送一条");
             }
@@ -1531,6 +1564,15 @@ export default {
             if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 23 || this.setting[i].contentType == 24) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
               return this.$message.error("小程序封面地址不能为空")
             }
+            if (this.setting[i].contentType == 20 && (this.setting[i].liveId == null || this.setting[i].liveId == "")) {
+              return this.$message.error("直播间不能为空")
+            }
+            if (this.setting[i].contentType == 20 && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
+              return this.$message.error("标题不能为空")
+            }
+            if (this.setting[i].contentType == 20 && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
+              return this.$message.error("封面不能为空")
+            }
             if (this.setting[i].contentType == 5 && (this.setting[i].fileUrl == null || this.setting[i].fileUrl == "")) {
               return this.$message.error("文件不能为空")
             }