提交 d4cca10c 编写于 作者: yi.li's avatar yi.li

新建编辑直播修改1

上级 f9b7fd9d
<template> <template>
<div class="yqrange-index-wrapper"> <div class="yqrange-index-wrapper">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird":jumPathThird="jumPathThird"></bread-crumb>
<div class="yqrange-index-content screenSet" id="screenSet"> <div class="yqrange-index-content screenSet" id="screenSet">
<el-row class="step-content"> <el-row class="step-content">
<el-col :span="12"> <el-col :span="12">
...@@ -275,10 +275,11 @@ ...@@ -275,10 +275,11 @@
} }
}; };
return{ return{
circleId: '',
curmbFirst: '云鹊小圈', curmbFirst: '云鹊小圈',
curmbSecond: '直播管理', curmbSecond: '直播管理',
curmbThird: '新建直播', curmbThird: '新建直播',// /live-manage?id=
circleId: '', jumPathThird: '',
//页面展示位置 //页面展示位置
isCollectShow: false, isCollectShow: false,
formData: { formData: {
...@@ -334,6 +335,7 @@ ...@@ -334,6 +335,7 @@
uploadImgMessage2: false, uploadImgMessage2: false,
imgMouseOver3: false, imgMouseOver3: false,
uploadImgMessage3:false, uploadImgMessage3:false,
submitFlag: false,
pickerOptions0: { pickerOptions0: {
disabledDate: time => { disabledDate: time => {
// 在科学计数法中,为了使公式简便,可以用带“E”的格式表示。例如1.03乘10的8次方,可简写为“1.03e8”的形式 // 在科学计数法中,为了使公式简便,可以用带“E”的格式表示。例如1.03乘10的8次方,可简写为“1.03e8”的形式
...@@ -395,6 +397,8 @@ ...@@ -395,6 +397,8 @@
let idType = localStorage.getItem('storageIdType'); let idType = localStorage.getItem('storageIdType');
this.circleId = this.$route.query.circleId; this.circleId = this.$route.query.circleId;
this.formData.circleId = this.circleId; this.formData.circleId = this.circleId;
this.jumPathThird = '/live-manage?id=' + this.circleId;
// if(circleId){ // if(circleId){
// this.curmbThird = "新建直播"; // this.curmbThird = "新建直播";
// } // }
...@@ -428,9 +432,14 @@ ...@@ -428,9 +432,14 @@
initRtcInfo(rtcId){ initRtcInfo(rtcId){
getRtcInfo({ getRtcInfo({
rtcId rtcId
}).then((data) => { }).then((res) => {
if(data.code == "000000") { if(res.code == "000000") {
this.formData = data.data; this.formData = res.data;
if(this.formData != null){
if(this.formData.guests == null || this.formData.guests.length == 0){
this.formData.guests = [{phone: '',username: ''}];
}
}
this.formData.circleId = this.circleId; this.formData.circleId = this.circleId;
this.initFormData(); this.initFormData();
console.log(this.formData); console.log(this.formData);
...@@ -596,6 +605,19 @@ ...@@ -596,6 +605,19 @@
let flag = true; let flag = true;
if(this.formData.guests != null & this.formData.guests.length >= 1){ if(this.formData.guests != null & this.formData.guests.length >= 1){
for(let i=0;i<this.formData.guests.length;i++) { for(let i=0;i<this.formData.guests.length;i++) {
if(this.formData.guests[i].username == "" & this.formData.guests[i].phone == ""){
// this.formData.guests.splice(i, 1);
if(this.submitFlag){
this.formData.guests.splice(i, 1);
continue;
}
else {
this.$message.error("请输入嘉宾姓名和手机号");
flag = false;
break;
}
}
if(this.formData.guests[i].username != "" & this.formData.guests[i].phone == ""){ if(this.formData.guests[i].username != "" & this.formData.guests[i].phone == ""){
this.$message.error("请输入嘉宾'" + this.formData.guests[i].username + "'的手机号"); this.$message.error("请输入嘉宾'" + this.formData.guests[i].username + "'的手机号");
flag = false; flag = false;
...@@ -648,6 +670,8 @@ ...@@ -648,6 +670,8 @@
// 增加嘉宾 // 增加嘉宾
addGuest(index) { addGuest(index) {
this.submitFlag = false;
if(!this.checkGuests()){ if(!this.checkGuests()){
return; return;
} }
...@@ -734,6 +758,8 @@ ...@@ -734,6 +758,8 @@
//完成 //完成
submit() { submit() {
this.submitFlag = true;
this.setFormData(); this.setFormData();
// 校验直播简介文字版或图片版 // 校验直播简介文字版或图片版
if(!this.checkIntroduce()){ if(!this.checkIntroduce()){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册