提交 095630c5 编写于 作者: bo.dang's avatar bo.dang

编辑直播回显

上级 f03273bb
...@@ -37,6 +37,19 @@ ...@@ -37,6 +37,19 @@
<span class="word-num">{{(formData.name).replace(/\s+/g,"").length}}/20</span> <span class="word-num">{{(formData.name).replace(/\s+/g,"").length}}/20</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="是否公开" prop="scope">
<el-radio-group v-model="formData.scope" size="small" @change="changeScope">
<el-radio label="1">否(仅限圈内人观看)</el-radio>
<el-radio label="2">是(任何人可观看)</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否收集用户信息" prop="infoCollect" v-if="isCollectShow">
<el-radio-group v-model="formData.infoCollect" size="small">
<el-radio label="0"></el-radio>
<el-radio label="1">是(收集姓名等信息)</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="直播方式" prop="streamType"> <el-form-item label="直播方式" prop="streamType">
<el-radio-group v-model="formData.streamType" size="small" @change="changeStreamType"> <el-radio-group v-model="formData.streamType" size="small" @change="changeStreamType">
<el-radio label="1" :disabled="styleEditFlag">网页直播</el-radio> <el-radio label="1" :disabled="styleEditFlag">网页直播</el-radio>
...@@ -68,20 +81,6 @@ ...@@ -68,20 +81,6 @@
</el-form-item> </el-form-item>
<el-form-item label="是否公开" prop="scope">
<el-radio-group v-model="formData.scope" size="small" @change="changeScope">
<el-radio label="1">否(仅限圈内人观看)</el-radio>
<el-radio label="2">是(任何人可观看)</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否收集用户信息" prop="infoCollect" v-if="isCollectShow">
<el-radio-group v-model="formData.infoCollect" size="small">
<el-radio label="0"></el-radio>
<el-radio label="1">是(收集姓名等信息)</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="直播开始时间" prop="openTime"> <el-form-item label="直播开始时间" prop="openTime">
<el-col :span="6"> <el-col :span="6">
<el-date-picker <el-date-picker
...@@ -99,7 +98,7 @@ ...@@ -99,7 +98,7 @@
<el-col :span="12"> <el-col :span="12">
<div style="color:#666666;font-size:10px;">直播图片可选择仅文字版,仅图片版或文字版+图片版</div> <div style="color:#666666;font-size:10px;">直播图片可选择仅文字版,仅图片版或文字版+图片版</div>
<el-input type="textarea" v-model="formData.textContent" placeholder="请输入直播简介" maxlength="300" rows="4" style="width:80%;"></el-input> <el-input type="textarea" v-model="formData.textContent" placeholder="请输入直播简介" maxlength="300" rows="4" style="width:80%;"></el-input>
<span class="word-num">{{(formData.textContent).replace(/\s+/g,"").length}}/300</span> <span class="word-num">{{(formData.textContent).replace(/\s+/g,"").length }}/300</span>
<div style="color:#666666;font-size:12px;">文字版</div> <div style="color:#666666;font-size:12px;">文字版</div>
</el-col> </el-col>
<!--<el-col :span="12" class="basic-item-icon" style="margin-top:35px;">--> <!--<el-col :span="12" class="basic-item-icon" style="margin-top:35px;">-->
...@@ -422,6 +421,7 @@ ...@@ -422,6 +421,7 @@
username: '' username: ''
}] // 嘉宾 }] // 嘉宾
}, },
introTextNum: 0,
// imgUrl1: '', // imgUrl1: '',
imgUrl1More: {}, imgUrl1More: {},
guestErrFlag: false, guestErrFlag: false,
...@@ -561,7 +561,7 @@ ...@@ -561,7 +561,7 @@
} }
}).catch((error) => { }).catch((error) => {
this.$message({ this.$message({
message: error, message: "请重试",
type: 'error' type: 'error'
}); });
}) })
...@@ -799,15 +799,27 @@ ...@@ -799,15 +799,27 @@
// 校验拉流地址 // 校验拉流地址
checkpullStream(){ checkpullStream(){
let flag = true; let flag = true;
if(this.pullFlag){ if(this.formData.streamType == "2"){
if(this.formData.pullStreamRtmp == ""){
this.$message.warning("请输入APP拉流地址"); // 公开直播,两个拉流地址都需要
flag = false; if(this.formData.scope == "2"){
if(this.formData.pullStreamRtmp == ""){
this.$message.warning("请输入APP拉流地址");
flag = false;
}
if(this.formData.pullStreamHttp == ""){
this.$message.warning("请输入H5拉流地址");
flag = false;
}
} }
if(this.formData.pullStreamHttp == ""){ else {
this.$message.warning("请输入H5拉流地址"); if(this.formData.pullStreamRtmp == "" && this.formData.pullStreamHttp == ""){
flag = false; this.$message.warning("请输入APP拉流地址或H5拉流地址");
flag = false;
}
} }
} }
return flag; return flag;
}, },
...@@ -817,8 +829,9 @@ ...@@ -817,8 +829,9 @@
// console.log(this.formData.rtcIntroduces[1].content); // console.log(this.formData.rtcIntroduces[1].content);
let flag = true; let flag = true;
if(this.formData.textContent == "" // if(this.formData.textContent == ""
& this.formData.imageContent == ""){ // & this.formData.imageContent == ""){
if(this.formData.rtcIntroduces == null || this.formData.rtcIntroduces.length == 0){
flag = false; flag = false;
this.$message.error("直播简介中可选择仅文字版,仅图片版或文字版+图片版"); this.$message.error("直播简介中可选择仅文字版,仅图片版或文字版+图片版");
} }
...@@ -986,20 +999,32 @@ ...@@ -986,20 +999,32 @@
this.isCollectShow = true; this.isCollectShow = true;
} }
this.formData.infoCollect = String(this.formData.infoCollect); this.formData.infoCollect = String(this.formData.infoCollect);
this.$set(this.formData, 'textContent', "");
if(this.formData.rtcIntroduces != null){ if(this.formData.rtcIntroduces != null){
for(let i=0;i<this.formData.rtcIntroduces.length;i++) { for(let i=0;i<this.formData.rtcIntroduces.length;i++) {
if(this.formData.rtcIntroduces[i].type == "1"){ if(this.formData.rtcIntroduces[i].type == "1"){
// this.formData.textContent = this.formData.rtcIntroduces[i].content; // this.formData.textContent = this.formData.rtcIntroduces[i].content;
this.$set(this.formData, 'textContent', this.formData.rtcIntroduces[i].content); this.$set(this.formData, 'textContent', this.formData.rtcIntroduces[i].content);
break;
} }
else if(this.formData.rtcIntroduces[i].type == "2"){ // else if(this.formData.rtcIntroduces[i].type == "2"){
// this.formData.imageContent = this.formData.rtcIntroduces[i].content; // // this.formData.imageContent = this.formData.rtcIntroduces[i].content;
this.$set(this.formData, 'imageContent', this.formData.rtcIntroduces[i].content); // this.$set(this.formData, 'imageContent', this.formData.rtcIntroduces[i].content);
} // }
} }
} }
// (formData.textContent).replace(/\s+/g,"").length
// if(this.formData.textContent == ""){
// this.introTextNum = 0;
// }
// else {
// this.introTextNum
// }
// 设置讲师 // 设置讲师
if(this.formData.lecturers != null){ if(this.formData.lecturers.length > 0){
// this.formData.lecturesUserName = this.formData.lecturers[0].username; // this.formData.lecturesUserName = this.formData.lecturers[0].username;
// this.formData.lecturesPhone = this.formData.lecturers[0].phone; // this.formData.lecturesPhone = this.formData.lecturers[0].phone;
this.$set(this.formData, 'lecturesUserName', this.formData.lecturers[0].username); this.$set(this.formData, 'lecturesUserName', this.formData.lecturers[0].username);
...@@ -1016,9 +1041,11 @@ ...@@ -1016,9 +1041,11 @@
} }
// 直播简介文字版 // 直播简介文字版
// this.formData.rtcIntroduces[0].type = 1; if(this.formData.textContent != null && this.formData.textContent != ""){
// this.formData.rtcIntroduces[0].content = this.formData.textContent; this.formData.rtcIntroduces.push({type:1,content:this.formData.textContent});
// // 直播简介图片版 }
// this.formData.rtcIntroduces[0].content = this.formData.textContent;
// 直播简介图片版
// this.formData.rtcIntroduces[1].type = 2; // this.formData.rtcIntroduces[1].type = 2;
// this.formData.rtcIntroduces[1].content = this.formData.imageContent; // this.formData.rtcIntroduces[1].content = this.formData.imageContent;
// 设置讲师 // 设置讲师
...@@ -1029,8 +1056,10 @@ ...@@ -1029,8 +1056,10 @@
// //
// this.formData.lecturers.push({username: this.formData.lecturesUserName, phone: this.formData.lecturesPhone}); // this.formData.lecturers.push({username: this.formData.lecturesUserName, phone: this.formData.lecturesPhone});
// } // }
this.formData.lecturers[0].username = this.formData.lecturesUserName; if(this.formData.lecturesUserName){
this.formData.lecturers[0].phone = this.formData.lecturesPhone; this.formData.lecturers[0].username = this.formData.lecturesUserName;
this.formData.lecturers[0].phone = this.formData.lecturesPhone;
}
}, },
complete(formName) { complete(formName) {
......
...@@ -821,6 +821,8 @@ export default { ...@@ -821,6 +821,8 @@ export default {
liveScope: res.data.pageContents[i].scope, liveScope: res.data.pageContents[i].scope,
liveStatus: res.data.pageContents[i].liveStatus, liveStatus: res.data.pageContents[i].liveStatus,
streamType: res.data.pageContents[i].streamType, streamType: res.data.pageContents[i].streamType,
playbackSetFlag: res.data.pageContents[i].playbackSetFlag,
canPlayback: res.data.pageContents[i].canPlayback,
createTime: res.data.pageContents[i].createdTime, createTime: res.data.pageContents[i].createdTime,
startTime: res.data.pageContents[i].openTime, startTime: res.data.pageContents[i].openTime,
endTime: res.data.pageContents[i].endTime, endTime: res.data.pageContents[i].endTime,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册