|
@@ -211,7 +211,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.initCategoryData()
|
|
this.initCategoryData()
|
|
|
- this.initCoverUploadConfig()
|
|
|
|
|
|
|
+ this.initUploadConfig()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
// 初始化编辑数据
|
|
// 初始化编辑数据
|
|
@@ -242,20 +242,25 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- async initCoverUploadConfig() {
|
|
|
|
|
|
|
+ initUploadConfig() {
|
|
|
getVideoChannelInfo().then(resp => {
|
|
getVideoChannelInfo().then(resp => {
|
|
|
if (resp.code === 0) {
|
|
if (resp.code === 0) {
|
|
|
this.uploadConfig = resp.data
|
|
this.uploadConfig = resp.data
|
|
|
this.uploadConfig.title = this.isEdit ? '重新上传视频文件' : '上传视频文件'
|
|
this.uploadConfig.title = this.isEdit ? '重新上传视频文件' : '上传视频文件'
|
|
|
this.uploadConfig.fileAttrs = { accept: 'video/*' }
|
|
this.uploadConfig.fileAttrs = { accept: 'video/*' }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.warning(resp.msg)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- const res = await getVideoCoverChannelInfo()
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- this.imgOssUrl = res.data.ossUrl
|
|
|
|
|
- this.imgHeaders.Authorization = 'Bearer ' + res.data.token
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ getVideoCoverChannelInfo().then(res => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ this.imgOssUrl = res.data.ossUrl
|
|
|
|
|
+ this.imgHeaders.Authorization = 'Bearer ' + res.data.token
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.warning(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 2. 视频上传组件回调
|
|
// 2. 视频上传组件回调
|