增加设置腾讯视频入口
This commit is contained in:
@@ -24,7 +24,8 @@
|
|||||||
<el-form-item v-if="form.courseType === '0'" label="正文" prop="content" style="width: 100%;" :rules="[{required: true, message: '请输入内容', trigger: 'change'}]">
|
<el-form-item v-if="form.courseType === '0'" label="正文" prop="content" style="width: 100%;" :rules="[{required: true, message: '请输入内容', trigger: 'change'}]">
|
||||||
<ai-editor v-model="form.content" :instance="instance"/>
|
<ai-editor v-model="form.content" :instance="instance"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.courseType === '0' && !isHideCoverimg" label="封面图片" prop="pictureUrl" :rules="[{required: true, message: '请上传封面图片', trigger: 'change'}]" style="width: 100%;">
|
<el-form-item v-if="form.courseType === '0' && !isHideCoverimg" label="封面图片" prop="pictureUrl" :rules="[{required: true, message: '请上传封面图片', trigger: 'change'}]"
|
||||||
|
style="width: 100%;">
|
||||||
<ai-uploader
|
<ai-uploader
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
isShowTip
|
isShowTip
|
||||||
@@ -38,7 +39,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-uploader>
|
</ai-uploader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.courseType === '1'" label="视频" prop="videoUrl" style="width: 100%;" :rules="[{required: true, message: '请上传视频', trigger: 'change'}]">
|
<el-form-item v-if="form.courseType==1" label="腾讯视频ID" class="w100">
|
||||||
|
<el-input v-model="form.videoId" clearable placeholder="请从腾讯视频创作号上获取对应视频id"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.courseType==='1'&&!form.videoId" label="视频" prop="videoUrl" style="width: 100%;" :rules="[{required: true, message: '请上传视频', trigger: 'change'}]">
|
||||||
<el-upload :show-file-list="false" ref="upload1" action :http-request="submitUpload" :accept="accept" :limit="1">
|
<el-upload :show-file-list="false" ref="upload1" action :http-request="submitUpload" :accept="accept" :limit="1">
|
||||||
<div class="video" v-if="!form.videoUrl.length">
|
<div class="video" v-if="!form.videoUrl.length">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
@@ -81,8 +85,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import mp4box from 'mp4box'
|
import mp4box from 'mp4box'
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
name: 'Add',
|
name: 'Add',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@@ -90,7 +95,7 @@
|
|||||||
dict: Object,
|
dict: Object,
|
||||||
params: Object
|
params: Object
|
||||||
},
|
},
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
accept: '.mp4',
|
accept: '.mp4',
|
||||||
@@ -125,7 +130,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created() {
|
||||||
this.dict.load('qjCourseType').then(() => {
|
this.dict.load('qjCourseType').then(() => {
|
||||||
if (this.params && this.params.id) {
|
if (this.params && this.params.id) {
|
||||||
this.getInfo(this.params.id)
|
this.getInfo(this.params.id)
|
||||||
@@ -134,7 +139,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getInfo (id) {
|
getInfo(id) {
|
||||||
this.instance.post(`/app/appcourseinfo/queryDetailById?id=${id}`).then(res => {
|
this.instance.post(`/app/appcourseinfo/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
@@ -148,7 +153,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange () {
|
onChange() {
|
||||||
this.form.videoUrl = []
|
this.form.videoUrl = []
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -205,7 +210,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
confirm () {
|
confirm() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
@@ -229,18 +234,18 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel (isRefresh) {
|
cancel(isRefresh) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'List',
|
type: 'List',
|
||||||
isRefresh: !!isRefresh
|
isRefresh: !!isRefresh
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.content-add {
|
.content-add {
|
||||||
.video {
|
.video {
|
||||||
width: 640px;
|
width: 640px;
|
||||||
height: 360px;
|
height: 360px;
|
||||||
@@ -287,5 +292,5 @@
|
|||||||
border: 1px solid #D0D4DC;
|
border: 1px solid #D0D4DC;
|
||||||
margin-top: -40px;
|
margin-top: -40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user