Browse Source

视频封面采用 coverFileId

reghao 2 năm trước cách đây
mục cha
commit
17460f99a2
1 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 5 4
      src/components/upload/PublishVideo.vue

+ 5 - 4
src/components/upload/PublishVideo.vue

@@ -152,7 +152,8 @@ export default {
       form: {
         videoFileId: null,
         channelId: process.env.VUE_APP_UPLOAD_VIDEO_CHANNEL,
-        coverUrl: null,
+        coverFileId: null,
+        coverChannelId: process.env.VUE_APP_UPLOAD_COVER_CHANNEL,
         title: null,
         description: null,
         categoryPid: null,
@@ -348,7 +349,7 @@ export default {
             if (json.code === 0) {
               this.coverUrl = URL.createObjectURL(coverFile)
               const resData = json.data
-              this.form.coverUrl = resData.url
+              this.form.coverFileId = resData.uploadId
             } else {
               this.$notify({
                 title: '提示',
@@ -381,7 +382,7 @@ export default {
       if (res.code === 0) {
         const resData = res.data
         this.coverUrl = URL.createObjectURL(file.raw)
-        this.form.coverUrl = resData.url
+        this.form.coverFileId = resData.uploadId
       } else {
         this.$notify({
           title: '提示',
@@ -462,7 +463,7 @@ export default {
         return
       }
 
-      if (!this.form.coverUrl) {
+      if (!this.form.coverFileId) {
         this.$notify({
           title: '提示',
           message: '你还没有上传视频封面',