|
@@ -135,7 +135,7 @@ export default {
|
|
|
Authorization: ''
|
|
Authorization: ''
|
|
|
},
|
|
},
|
|
|
imgData: {
|
|
imgData: {
|
|
|
- channelId: process.env.VUE_APP_UPLOAD_COVER_CHANNEL
|
|
|
|
|
|
|
+ channelId: null
|
|
|
},
|
|
},
|
|
|
coverUrl: null,
|
|
coverUrl: null,
|
|
|
// ****************************************************************************************************************
|
|
// ****************************************************************************************************************
|
|
@@ -152,9 +152,9 @@ export default {
|
|
|
],
|
|
],
|
|
|
form: {
|
|
form: {
|
|
|
videoFileId: null,
|
|
videoFileId: null,
|
|
|
- channelId: process.env.VUE_APP_UPLOAD_VIDEO_CHANNEL,
|
|
|
|
|
|
|
+ channelId: 0,
|
|
|
coverFileId: null,
|
|
coverFileId: null,
|
|
|
- coverChannelId: process.env.VUE_APP_UPLOAD_COVER_CHANNEL,
|
|
|
|
|
|
|
+ coverChannelId: 0,
|
|
|
title: null,
|
|
title: null,
|
|
|
description: null,
|
|
description: null,
|
|
|
categoryPid: null,
|
|
categoryPid: null,
|
|
@@ -169,6 +169,7 @@ export default {
|
|
|
getVideoChannelInfo().then(res => {
|
|
getVideoChannelInfo().then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
const resData = res.data
|
|
const resData = res.data
|
|
|
|
|
+ this.form.channelId = resData.channelId
|
|
|
this.options = {
|
|
this.options = {
|
|
|
target: resData.ossUrl,
|
|
target: resData.ossUrl,
|
|
|
chunkSize: resData.maxSize,
|
|
chunkSize: resData.maxSize,
|
|
@@ -176,7 +177,7 @@ export default {
|
|
|
testChunks: false,
|
|
testChunks: false,
|
|
|
query: (file, chunk) => {
|
|
query: (file, chunk) => {
|
|
|
return {
|
|
return {
|
|
|
- channelId: this.form.channelId
|
|
|
|
|
|
|
+ channelId: resData.channelId
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
headers: {
|
|
headers: {
|
|
@@ -201,44 +202,11 @@ export default {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- /* getServerInfo(this.form.channelId).then(res => {
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- const resData = res.data
|
|
|
|
|
- this.options = {
|
|
|
|
|
- target: resData.ossUrl,
|
|
|
|
|
- chunkSize: resData.maxSize,
|
|
|
|
|
- fileParameterName: 'file',
|
|
|
|
|
- testChunks: false,
|
|
|
|
|
- query: (file, chunk) => {
|
|
|
|
|
- return {
|
|
|
|
|
- channelId: this.form.channelId
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- headers: {
|
|
|
|
|
- Authorization: 'Bearer ' + resData.token
|
|
|
|
|
- },
|
|
|
|
|
- withCredentials: false
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: '获取 OSS 服务器地址失败, 暂时无法上传视频文件',
|
|
|
|
|
- type: 'error',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(error => {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: '获取 OSS 服务器地址失败, 暂时无法上传视频文件',
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
- })*/
|
|
|
|
|
-
|
|
|
|
|
getVideoCoverChannelInfo().then(res => {
|
|
getVideoCoverChannelInfo().then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
const resData = res.data
|
|
const resData = res.data
|
|
|
|
|
+ this.form.coverChannelId = resData.channelId
|
|
|
|
|
+ this.imgData.channelId = resData.channelId
|
|
|
this.imgOssUrl = resData.ossUrl
|
|
this.imgOssUrl = resData.ossUrl
|
|
|
this.imgHeaders.Authorization = 'Bearer ' + resData.token
|
|
this.imgHeaders.Authorization = 'Bearer ' + resData.token
|
|
|
} else {
|
|
} else {
|