Przeglądaj źródła

优化对视频素材封面url后缀的定义与使用

任一存 2 lat temu
rodzic
commit
bfd2fa3347

+ 1 - 1
packages/qjkankan-editor/src/components/RichTextEditor.vue

@@ -119,7 +119,7 @@ export default Vue.extend({
       this.isShowVideoSelectionWindow = false
       for (const selectedItem of selected) {
         console.log(selectedItem);
-        this.insertFn(selectedItem.ossPath, selectedItem.ossPath + this.$videoImg)
+        this.insertFn(selectedItem.ossPath, selectedItem.ossPath + this.$videoImgOriginalSize)
       }
     },
   },

+ 3 - 3
packages/qjkankan-editor/src/components/materialSelector.vue

@@ -300,7 +300,7 @@
         v-slot:materialUploadSuccessIcon="slotProps"
       >
         <img
-          :src="slotProps.uploadInfo.successInfo[slotProps.tableItemStructure.key] + $imgsuffix"
+          :src="slotProps.uploadInfo.successInfo[slotProps.tableItemStructure.key]"
           alt=""
         />
       </template>
@@ -326,7 +326,7 @@
         v-slot:materialIcon="slotProps"
       >
         <img
-          :src="slotProps.materialInfo[slotProps.tableItemStructure.key] + $imgsuffix"
+          :src="slotProps.materialInfo[slotProps.tableItemStructure.key]"
           alt=""
         />
       </template>
@@ -501,7 +501,7 @@ export default {
       }
     },
     videoMaterialItemCustomProcess(item) {
-      item.icon = process.env.VUE_APP_ORIGIN == 'aws' ? item.icon : (item.ossPath + '?x-oss-process=video/snapshot,t_0,f_jpg,w_89,h_50,m_fast,ar_auto')
+      item.icon = process.env.VUE_APP_ORIGIN == 'aws' ? item.icon : (item.ossPath + this.$videoImg)
     },
     onClickComfirm: debounce(function () {
       this.$emit('submit', this.select)

+ 4 - 2
packages/qjkankan-editor/src/mixins/index.js

@@ -84,8 +84,10 @@ Vue.prototype.$msg.error = (string)=>{
   });
 }
 
-Vue.prototype.$videoImg = "?x-oss-process=video/snapshot,t_0,f_jpg,w_0,h_0,m_fast,ar_auto";
-  
+Vue.prototype.$videoImg = "?x-oss-process=video/snapshot,t_0,f_jpg,w_100,m_fast,ar_auto";
+
+Vue.prototype.$videoImgOriginalSize = "?x-oss-process=video/snapshot,t_0,f_jpg,m_fast,ar_auto";
+
 Vue.prototype.$imgsuffix = '?x-oss-process=image/resize,m_lfit,w_200/crop,w_200,h_200'
 
 Vue.prototype.$getImgResizeSuffix = function(width, height) {

+ 1 - 1
packages/qjkankan-editor/src/views/material/video/index.vue

@@ -572,7 +572,7 @@ export default {
             if (i.type !== 'dir') {
               i.fileSize = changeByteUnit(Number(i.fileSize));
             }
-            i.icon = process.env.VUE_APP_ORIGIN=='aws'?i.icon:(i.ossPath + '?x-oss-process=video/snapshot,t_0,f_jpg,w_89,h_50,m_fast,ar_auto');
+            i.icon = process.env.VUE_APP_ORIGIN=='aws' ? i.icon : (i.ossPath + this.$videoImg);
             return i;
           });
           this.list = this.list.concat(newData)