reghao 2 лет назад
Родитель
Сommit
b00c98ffee
2 измененных файлов с 0 добавлено и 58 удалено
  1. 0 29
      src/components/upload/PublishVideo.vue
  2. 0 29
      src/components/upload/UploadFile.vue

+ 0 - 29
src/components/upload/PublishVideo.vue

@@ -77,7 +77,6 @@
 
 <script>
 import { videoCategory, submitVideo } from '@/api/video'
-import { getOssPolicy } from '@/api/file'
 
 export default {
   name: 'PublishVideo',
@@ -93,7 +92,6 @@ export default {
           return {
             key: this.form.videoObjectName,
             acl: '',
-            policy: '',
             'content-type': '',
             'success_action_redirect': '',
             'x-amz-meta-uuid': '',
@@ -140,7 +138,6 @@ export default {
     }
   },
   created() {
-    this.getOssPolicyWrapper()
     this.getVideoCategory()
   },
   methods: {
@@ -344,32 +341,6 @@ export default {
         }
       }
     },
-    getOssPolicyWrapper() {
-      getOssPolicy(this.videoPost)
-        .then(res => {
-          if (res.code === 0) {
-            this.form.videoObjectName = res.data.videoObjectName
-          } else {
-            this.$notify(
-              {
-                title: '提示',
-                message: res.msg,
-                type: 'warning',
-                duration: 3000
-              }
-            )
-          }
-        }).catch(error => {
-        this.$notify(
-          {
-            title: '提示',
-            message: error.message,
-            type: 'warning',
-            duration: 3000
-          }
-        )
-        })
-    },
     onSubmit() {
       if (!this.form.videoObjectName) {
         this.$notify(

+ 0 - 29
src/components/upload/UploadFile.vue

@@ -42,7 +42,6 @@
 
 <script>
 import { submitVideo } from '@/api/video'
-import { getOssPolicy } from '@/api/file'
 import { hashFile } from '@/utils/hash'
 
 export default {
@@ -71,7 +70,6 @@ export default {
           return {
             key: this.form.objectName,
             acl: '',
-            policy: '',
             'content-type': '',
             'success_action_redirect': '',
             'x-amz-meta-uuid': '',
@@ -97,7 +95,6 @@ export default {
     }
   },
   created() {
-    this.getOssPolicyWrapper()
   },
   methods: {
     /***********************************************************************/
@@ -168,32 +165,6 @@ export default {
         this.form.title = title
       }
     },
-    getOssPolicyWrapper() {
-      getOssPolicy(this.videoPost)
-        .then(res => {
-          if (res.code === 0) {
-            this.form.objectName = res.data.objectName
-          } else {
-            this.$notify(
-              {
-                title: '提示',
-                message: res.msg,
-                type: 'warning',
-                duration: 3000
-              }
-            )
-          }
-        }).catch(error => {
-        this.$notify(
-          {
-            title: '提示',
-            message: error.message,
-            type: 'warning',
-            duration: 3000
-          }
-        )
-      })
-    },
     onSubmit() {
       if (!this.form.objectName) {
         this.$notify(