|
@@ -110,14 +110,15 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
headers: {
|
|
headers: {
|
|
|
- Authorization: 'Bearer '
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Authorization: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ withCredentials: true,
|
|
|
},
|
|
},
|
|
|
attrs: {
|
|
attrs: {
|
|
|
accept: 'video/*'
|
|
accept: 'video/*'
|
|
|
},
|
|
},
|
|
|
imgHeaders: {
|
|
imgHeaders: {
|
|
|
- Authorization: 'Bearer '
|
|
|
|
|
|
|
+ Authorization: ''
|
|
|
},
|
|
},
|
|
|
imgData: {
|
|
imgData: {
|
|
|
channelId: 3
|
|
channelId: 3
|
|
@@ -168,6 +169,7 @@ export default {
|
|
|
getServerInfo(2).then(res => {
|
|
getServerInfo(2).then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
const resData = res.data
|
|
const resData = res.data
|
|
|
|
|
+ console.log(resData.token)
|
|
|
this.options.target = resData.ossUrl
|
|
this.options.target = resData.ossUrl
|
|
|
this.options.chunkSize = resData.maxSize
|
|
this.options.chunkSize = resData.maxSize
|
|
|
this.options.headers.Authorization = "Bearer " + resData.token
|
|
this.options.headers.Authorization = "Bearer " + resData.token
|
|
@@ -182,7 +184,7 @@ export default {
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
- message: error.message,
|
|
|
|
|
|
|
+ message: '视频上传配置失败 ' + error.message,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
})
|
|
})
|
|
@@ -190,8 +192,7 @@ export default {
|
|
|
|
|
|
|
|
getServerInfo(5).then(res => {
|
|
getServerInfo(5).then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
- this.imgHeaders.Authorization = 'Bearer ' + res.data
|
|
|
|
|
- this.options.headers.Authorization = 'Bearer ' + res.data
|
|
|
|
|
|
|
+ this.imgHeaders.Authorization = 'Bearer ' + res.data.token
|
|
|
} else {
|
|
} else {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -203,7 +204,7 @@ export default {
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
- message: error.message,
|
|
|
|
|
|
|
+ message: '图片上传配置失败 ' + error.message,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
})
|
|
})
|