瀏覽代碼

update PublishVideo.vue

reghao 1 年之前
父節點
當前提交
4a3176f71c
共有 3 個文件被更改,包括 14 次插入5 次删除
  1. 2 1
      src/api/content.js
  2. 8 0
      src/api/file.js
  3. 4 4
      src/components/upload/PublishVideo.vue

+ 2 - 1
src/api/content.js

@@ -3,7 +3,8 @@ import { get, post } from '@/utils/request'
 const videoApi = {
   userContentDataApi: '/api/content/userdata',
   contentAccessCodeApi: '/api/content/userdata',
-  ossServerApi: '/api/content/oss/serverinfo',
+  ossServerApi: '/api/file/oss/serverinfo',
+  ossServerApi1: '/api/content/oss/serverinfo',
   siteNoticeApi: '/api/content/site/notice'
 }
 

+ 8 - 0
src/api/file.js

@@ -11,3 +11,11 @@ export function getAvatarChannelInfo() {
 export function getVideoChannelInfo() {
   return post(fileApi.ossServerApi + '/video')
 }
+
+export function getVideoCoverChannelInfo() {
+  return post(fileApi.ossServerApi + '/videocover')
+}
+
+export function getPhotoChannelInfo() {
+  return post(fileApi.ossServerApi + '/photo')
+}

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

@@ -118,7 +118,7 @@
 <script>
 import { getServerInfo } from '@/api/content'
 import { videoRegion, addVideoPost } from '@/api/video'
-import {getVideoChannelInfo} from "@/api/file";
+import { getVideoChannelInfo, getVideoCoverChannelInfo } from '@/api/file'
 
 export default {
   name: 'PublishVideo',
@@ -201,7 +201,7 @@ export default {
       })
     })
 
-    getServerInfo(this.form.channelId).then(res => {
+    /* getServerInfo(this.form.channelId).then(res => {
       if (res.code === 0) {
         const resData = res.data
         this.options = {
@@ -234,9 +234,9 @@ export default {
         type: 'warning',
         duration: 3000
       })
-    })
+    })*/
 
-    getServerInfo(this.imgData.channelId).then(res => {
+    getVideoCoverChannelInfo().then(res => {
       if (res.code === 0) {
         const resData = res.data
         this.imgOssUrl = resData.ossUrl