|
@@ -13,7 +13,7 @@
|
|
|
<v-row justify="center">
|
|
<v-row justify="center">
|
|
|
<v-col cols="10">
|
|
<v-col cols="10">
|
|
|
<!-- <v-file-input prepend-icon="mdi-video" show-size counter accept="video/*,.flv" chips label="请选择视频文件" @change="setFile" /> -->
|
|
<!-- <v-file-input prepend-icon="mdi-video" show-size counter accept="video/*,.flv" chips label="请选择视频文件" @change="setFile" /> -->
|
|
|
- <FilePondUpload @video="videoUploadSuccess" />
|
|
|
|
|
|
|
+ <FilePondUpload @video="videoUploadCallback" />
|
|
|
</v-col>
|
|
</v-col>
|
|
|
</v-row>
|
|
</v-row>
|
|
|
<v-row justify="center">
|
|
<v-row justify="center">
|
|
@@ -27,9 +27,6 @@
|
|
|
<v-img :src="videoInfo.coverUrl" aspect-ratio="1.77" contain max-height="150" alt="封面图,推荐16:9" />
|
|
<v-img :src="videoInfo.coverUrl" aspect-ratio="1.77" contain max-height="150" alt="封面图,推荐16:9" />
|
|
|
</v-card>
|
|
</v-card>
|
|
|
</v-col>
|
|
</v-col>
|
|
|
-
|
|
|
|
|
- <!--
|
|
|
|
|
- TODO 现阶段由系统生成封面
|
|
|
|
|
<v-col cols="5">
|
|
<v-col cols="5">
|
|
|
<v-file-input
|
|
<v-file-input
|
|
|
:rules="rules"
|
|
:rules="rules"
|
|
@@ -42,7 +39,7 @@
|
|
|
<v-btn color="primary" @click="uploadFile">
|
|
<v-btn color="primary" @click="uploadFile">
|
|
|
上传
|
|
上传
|
|
|
</v-btn>
|
|
</v-btn>
|
|
|
- </v-col>-->
|
|
|
|
|
|
|
+ </v-col>
|
|
|
</v-row>
|
|
</v-row>
|
|
|
<v-row justify="center">
|
|
<v-row justify="center">
|
|
|
<v-col cols="5">
|
|
<v-col cols="5">
|
|
@@ -200,7 +197,7 @@ export default {
|
|
|
this.files.push(value)
|
|
this.files.push(value)
|
|
|
},
|
|
},
|
|
|
// filepond 组件上传文件完成时调用
|
|
// filepond 组件上传文件完成时调用
|
|
|
- videoUploadSuccess(value) {
|
|
|
|
|
|
|
+ videoUploadCallback(value) {
|
|
|
if (value.code === 0) {
|
|
if (value.code === 0) {
|
|
|
this.videoInfo.videoId = value.data.videoId
|
|
this.videoInfo.videoId = value.data.videoId
|
|
|
this.setTitle(value.data.filename)
|
|
this.setTitle(value.data.filename)
|
|
@@ -237,7 +234,7 @@ export default {
|
|
|
for (let i = 0; i < this.files.length; i++) {
|
|
for (let i = 0; i < this.files.length; i++) {
|
|
|
formData.append('file[]', this.files[i])
|
|
formData.append('file[]', this.files[i])
|
|
|
}
|
|
}
|
|
|
- fetch(`/api/file/upload/image`, {
|
|
|
|
|
|
|
+ fetch(`http://file.reghao.cn/api/file/upload/image`, {
|
|
|
headers: {
|
|
headers: {
|
|
|
'X-XSRF-TOKEN': this.$cookies.get('XSRF-TOKEN')
|
|
'X-XSRF-TOKEN': this.$cookies.get('XSRF-TOKEN')
|
|
|
},
|
|
},
|
|
@@ -267,12 +264,7 @@ export default {
|
|
|
this.categoryMap.Set(name, res.data[i])
|
|
this.categoryMap.Set(name, res.data[i])
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- this.$notify({
|
|
|
|
|
- title: res.code,
|
|
|
|
|
- message: res.msg,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 500
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ console.error(res.msg)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(error => {
|
|
.catch(error => {
|