提交 0b29feee 编写于 作者: bo.dang's avatar bo.dang

背景图显示问题

上级 acb1eccb
...@@ -484,7 +484,7 @@ ...@@ -484,7 +484,7 @@
<el-form ref="setForm" :model="setForm"> <el-form ref="setForm" :model="setForm">
<!--<input type="text" id="copyInput" class="hidden-input" />--> <!--<input type="text" id="copyInput" class="hidden-input" />-->
<el-radio-group v-model="formData.backgroundImageIdTemp"> <el-radio-group v-model="formData.backgroundImageIdTemp">
<div class="radio-background" v-for="(item, index) in formData.backgroundImages" :key="index" v-if="index < 5"> <div class="radio-background" v-for="(item, index) in backgroundImages" :key="index" v-if="index < 5" @change="changeImage">
<el-radio :label="item.backgroundImageId"></el-radio> <el-radio :label="item.backgroundImageId"></el-radio>
<img class="background-img" :src="item.imageUrl" /> <img class="background-img" :src="item.imageUrl" />
</div> </div>
...@@ -505,34 +505,12 @@ ...@@ -505,34 +505,12 @@
<!--<img class="background-img" src="https://test1-file.yunqueyi.com/image/png/protal/project/20200720152355168.png" />--> <!--<img class="background-img" src="https://test1-file.yunqueyi.com/image/png/protal/project/20200720152355168.png" />-->
<!--</div>--> <!--</div>-->
</el-radio-group> </el-radio-group>
<el-radio-group v-model="formData.backgroundImageIdTemp" v-if="formData.backgroundImages && formData.backgroundImages.length > 5"> <el-radio-group v-model="formData.backgroundImageIdTemp" v-if="backgroundImages != null && backgroundImages.length > 5">
<div class="radio-background" v-for="(item, index) in formData.backgroundImages" :key="index" v-if="index > 4"> <div class="radio-background" v-for="(item, index) in backgroundImages" :key="index" v-if="index > 4">
<el-radio :label="item.backgroundImageId"></el-radio> <el-radio :label="item.backgroundImageId"></el-radio>
<img class="background-img" :src="item.imageUrl" /> <img class="background-img" :src="item.imageUrl" />
</div> </div>
</el-radio-group> </el-radio-group>
<!--<el-radio-group>-->
<!--<div class="radio-background">-->
<!--<el-radio :label="3"></el-radio>-->
<!--<img class="background-img" src="https://test1-file.yunqueyi.com/image/png/protal/project/20200720152355168.png" />-->
<!--</div>-->
<!--<div class="radio-background">-->
<!--<el-radio :label="6"></el-radio>-->
<!--<img class="background-img" src="https://test1-file.yunqueyi.com/image/png/protal/project/20200720152355168.png" />-->
<!--</div>-->
<!--<div class="radio-background">-->
<!--<el-radio :label="9"></el-radio>-->
<!--<img class="background-img" src="https://test1-file.yunqueyi.com/image/png/protal/project/20200720152355168.png" />-->
<!--</div>-->
<!--<div class="radio-background">-->
<!--<el-radio :label="12"></el-radio>-->
<!--<img class="background-img" src="https://test1-file.yunqueyi.com/image/png/protal/project/20200720152355168.png" />-->
<!--</div>-->
<!--<div class="radio-background">-->
<!--<el-radio :label="15"></el-radio>-->
<!--<img class="background-img" src="https://test1-file.yunqueyi.com/image/png/protal/project/20200720152355168.png" />-->
<!--</div>-->
<!--</el-radio-group>-->
</el-form> </el-form>
...@@ -607,7 +585,6 @@ ...@@ -607,7 +585,6 @@
preImage: '', // 直播预告图url preImage: '', // 直播预告图url
textContent: '', // 直播简介文字版 textContent: '', // 直播简介文字版
imageContent: '',// 直播简介图片版 imageContent: '',// 直播简介图片版
backgroundImages: [],// 直播背景图
// imgUrl2: '', // imgUrl2: '',
// imgUrl2More: {}, // imgUrl2More: {},
// imgUrl3: '', // imgUrl3: '',
...@@ -636,9 +613,10 @@ ...@@ -636,9 +613,10 @@
}, },
antiScreenCap: "0", antiScreenCap: "0",
backgroundImageId: null, backgroundImageId: "0",
backgroundImageIdTemp: null backgroundImageIdTemp: "0"
}, },
backgroundImages: [],// 直播背景图
introTextNum: 0, introTextNum: 0,
rtcIntroducesText:[], rtcIntroducesText:[],
rtcIntroducesImages: [], rtcIntroducesImages: [],
...@@ -745,13 +723,14 @@ ...@@ -745,13 +723,14 @@
this.formData.circleId = this.circleId; this.formData.circleId = this.circleId;
this.jumPathThird = '/live-manage?id=' + this.circleId; this.jumPathThird = '/live-manage?id=' + this.circleId;
}, },
mounted() { mounted() {
this.rtcId = this.$route.query.rtcId; this.rtcId = this.$route.query.rtcId;
// if(rtcId){ // if(rtcId){
// this.curmbThird = "编辑直播"; // this.curmbThird = "编辑直播";
// } // }
this.initImages(); // this.initImages();
if(this.rtcId){ if(this.rtcId){
this.curmbThird = "编辑直播"; this.curmbThird = "编辑直播";
this.initRtcInfo(this.rtcId); this.initRtcInfo(this.rtcId);
...@@ -772,8 +751,14 @@ ...@@ -772,8 +751,14 @@
getImages({ getImages({
}).then((res) => { }).then((res) => {
if(res.code == "000000") { if(res.code == "000000") {
this.formData.backgroundImages = res.data;
let images = res.data;
this.backgroundImages = images;
if(this.backgroundImages != null){
for(let i = 0; i < this.backgroundImages.length; i++){
this.backgroundImages[i].backgroundImageId = String(this.backgroundImages[i].backgroundImageId);
}
}
} }
}).catch((error) => { }).catch((error) => {
...@@ -1466,7 +1451,7 @@ ...@@ -1466,7 +1451,7 @@
this.formData.scope = String(this.formData.scope); this.formData.scope = String(this.formData.scope);
this.formData.antiScreenCap = String(this.formData.antiScreenCap); this.formData.antiScreenCap = String(this.formData.antiScreenCap);
this.formData.backgroundImageIdTemp = String(this.formData.backgroundImageId); this.formData.backgroundImageIdTemp = String(this.formData.backgroundImageId == null ? "0":this.formData.backgroundImageId);
if(this.formData.scope == "2"){ if(this.formData.scope == "2"){
this.isCollectShow = true; this.isCollectShow = true;
} }
...@@ -1659,6 +1644,7 @@ ...@@ -1659,6 +1644,7 @@
setBackground(){ setBackground(){
this.dialogVisible = true; this.dialogVisible = true;
this.initImages();
}, },
// 提交设置背景图 // 提交设置背景图
submitBackground(){ submitBackground(){
...@@ -1669,6 +1655,11 @@ ...@@ -1669,6 +1655,11 @@
this.dialogVisible = false; this.dialogVisible = false;
}, },
changeImage(){
console.log(this.formData.backgroundImageIdTemp);
},
delFile(){ delFile(){
if(this.uploadProgress1 > 0 && this.uploadProgress1 < 100){ if(this.uploadProgress1 > 0 && this.uploadProgress1 < 100){
openLoading(this); openLoading(this);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册