|
@@ -439,6 +439,36 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</div>
|
|
</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">
|
|
<div v-if="item.contentType == 8">
|
|
|
<el-button type="primary"
|
|
<el-button type="primary"
|
|
|
style="margin-bottom: 1%"
|
|
style="margin-bottom: 1%"
|
|
@@ -828,6 +858,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ checkLiveMiniprogramTitle(item) {
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
|
+ },
|
|
|
liveChange(content) {
|
|
liveChange(content) {
|
|
|
// content.liveId 是选中的直播间 ID(liveId)
|
|
// content.liveId 是选中的直播间 ID(liveId)
|
|
|
const selectedLive = this.liveList.find(live => live.liveId === content.liveId);
|
|
const selectedLive = this.liveList.find(live => live.liveId === content.liveId);
|
|
@@ -1476,7 +1509,7 @@ export default {
|
|
|
let hasLiveSetting = false;
|
|
let hasLiveSetting = false;
|
|
|
let jsonSetting = JSON.parse(this.msgForm.setting);
|
|
let jsonSetting = JSON.parse(this.msgForm.setting);
|
|
|
for(let index=0;index < jsonSetting.length;index++){
|
|
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){
|
|
if(!!hasLiveSetting){
|
|
|
return this.$message.error("发送直播间只能一次只能发送一条");
|
|
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 == "")) {
|
|
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("小程序封面地址不能为空")
|
|
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 == "")) {
|
|
if (this.setting[i].contentType == 5 && (this.setting[i].fileUrl == null || this.setting[i].fileUrl == "")) {
|
|
|
return this.$message.error("文件不能为空")
|
|
return this.$message.error("文件不能为空")
|
|
|
}
|
|
}
|