|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-row class="movie-list">
|
|
<el-row class="movie-list">
|
|
|
- <el-col :md="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
|
|
- <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
|
|
|
|
+ <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
|
|
+ <el-col :md="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
<el-card class="box-card">
|
|
<el-card class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
|
<span>上传视频文件</span>
|
|
<span>上传视频文件</span>
|
|
@@ -26,8 +26,8 @@
|
|
|
</uploader>
|
|
</uploader>
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
- </el-row>
|
|
|
|
|
- <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :md="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
<el-card class="box-card">
|
|
<el-card class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
|
<span>上传视频封面</span>
|
|
<span>上传视频封面</span>
|
|
@@ -52,10 +52,10 @@
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
- </el-row>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :md="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
|
|
- <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
|
|
+ <el-col :md="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
<el-card class="box-card">
|
|
<el-card class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
|
<span>稿件信息</span>
|
|
<span>稿件信息</span>
|
|
@@ -110,13 +110,13 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
- </el-row>
|
|
|
|
|
- </el-col>
|
|
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { videoRegion, addVideoPost } from '@/api/video'
|
|
|
|
|
|
|
+import { videoRegion } from '@/api/video'
|
|
|
import { getVideoChannelInfo, getVideoCoverChannelInfo } from '@/api/file'
|
|
import { getVideoChannelInfo, getVideoCoverChannelInfo } from '@/api/file'
|
|
|
import { hashFile } from '@/utils/functions'
|
|
import { hashFile } from '@/utils/functions'
|
|
|
|
|
|
|
@@ -208,8 +208,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
- title: '提示',
|
|
|
|
|
- message: '获取 OSS 服务器地址失败, 暂时无法上传视频文件',
|
|
|
|
|
|
|
+ title: '获取 OSS 服务器地址失败, 暂时无法上传视频文件',
|
|
|
|
|
+ message: error.message,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
})
|
|
})
|
|
@@ -232,8 +232,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
- title: '提示',
|
|
|
|
|
- message: '获取 OSS 服务器地址失败, 暂时无法上传视频封面',
|
|
|
|
|
|
|
+ title: '获取 OSS 服务器地址失败, 暂时无法上传视频封面',
|
|
|
|
|
+ message: error.message,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
})
|
|
})
|
|
@@ -521,42 +521,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (this.form.scheduledPubDate !== null) {
|
|
if (this.form.scheduledPubDate !== null) {
|
|
|
- console.log(this.form.scheduledPubDate)
|
|
|
|
|
- if (this.form.scheduledPubDate !== null) {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: '定时发布的时间必须在当前时间之后',
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- addVideoPost(this.form).then(res => {
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: '投稿成功,等待审核通过后其他人就可以看到你的视频了',
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
- this.$router.push('/post/list/video')
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: res.msg,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(error => {
|
|
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
- message: error.message,
|
|
|
|
|
|
|
+ message: '定时发布的时间必须在当前时间之后',
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$emit('video-publish', this.form)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|