|
@@ -48,7 +48,6 @@
|
|
|
v-if="form.coverImage"
|
|
|
type="video/mp4"
|
|
|
preload="auto"
|
|
|
- controls
|
|
|
:poster="form.videoCoverImage"
|
|
|
:src="form.coverImage"></video>
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
@@ -74,7 +73,7 @@
|
|
|
v-if="imageSize">上传图片尺寸为:{{ imageSize }}</p>
|
|
|
</el-form-item>
|
|
|
<!-- 广告管理才有时长 -->
|
|
|
- <el-form-item label="显示时长" prop="attribute1" v-if="type == 8">
|
|
|
+ <el-form-item label="显示时长(秒)" prop="attribute1" v-if="type == 8">
|
|
|
<el-input type="number" v-model.number="form.attribute1"></el-input>
|
|
|
<p style="color: red">建议时长不超过5秒</p>
|
|
|
</el-form-item>
|
|
@@ -125,6 +124,7 @@
|
|
|
|
|
|
<el-dialog title="插入视频"
|
|
|
width="500px"
|
|
|
+ @close="onDialogClose('diologForm')"
|
|
|
:visible.sync="dialogFormVisible">
|
|
|
<el-form :model="dialogForm"
|
|
|
ref="diologForm"
|
|
@@ -457,6 +457,9 @@ export default {
|
|
|
},
|
|
|
addAdvVideo() {
|
|
|
this.dialogFormVisible = true
|
|
|
+ let dialogForm = this.dialogForm
|
|
|
+ dialogForm.poster = this.form.videoCoverImage
|
|
|
+ dialogForm.url = this.form.coverImage
|
|
|
this.uploadStatus = true
|
|
|
},
|
|
|
onVideoComfirm (formName) {
|
|
@@ -495,6 +498,14 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ onDialogClose(diologForm) {
|
|
|
+ this.dialogForm = {
|
|
|
+ poster: null,
|
|
|
+ url: null,
|
|
|
+ videoUrl: null
|
|
|
+ }
|
|
|
+ this.$refs[diologForm].resetFields()
|
|
|
+ },
|
|
|
addQuillTitle () {
|
|
|
const oToolBar = document.querySelector(".ql-toolbar"),
|
|
|
aButton = oToolBar.querySelectorAll("button"),
|
|
@@ -608,11 +619,16 @@ export default {
|
|
|
if (res.code == 200) {
|
|
|
let result = res.data;
|
|
|
let form = this.form;
|
|
|
+ if(result.videoCoverImage) {
|
|
|
+ this.uploadType = 2
|
|
|
+ }
|
|
|
this.form = {
|
|
|
id: result.id,
|
|
|
title: result.title,
|
|
|
order: result.order,
|
|
|
coverImage: result.coverImage,
|
|
|
+ videoCoverImage: result.videoCoverImage,
|
|
|
+ attribute1: result.attribute1,
|
|
|
linkUrl: result.linkUrl,
|
|
|
type: result.type,
|
|
|
status: result.status,
|