瀏覽代碼

英文ppt上传修改

jwyu 1 年之前
父節點
當前提交
e064218a35
共有 1 個文件被更改,包括 20 次插入1 次删除
  1. 20 1
      src/views/ppt_manage/newVersion/pptEnPublish.vue

+ 20 - 1
src/views/ppt_manage/newVersion/pptEnPublish.vue

@@ -487,10 +487,29 @@ export default {
       };
 
       pptx2.write('blob').then((data)=>{
+        // 1走后端接口上传
+        const uploadType=this.$setting.dynamicOutLinks.PptUpdateApi ||
+                        this.$store.state.dynamicOutLinks.PptUpdateApi ||
+                        JSON.parse(localStorage.getItem('dynamicOutLinks')).PptUpdateApi
+        if(uploadType==1){
+          let form = new FormData()
+          form.append("file",data)
+          form.append("PptId",this.$route.query.id) 
+          pptInterface.uploadPPTXFile(form).then(res=>{
+            if(res.Ret===200){
+              this.publishPPT(res.Data.ResourceUrl)
+            }
+          })
+          return
+        }
+
+        
+        // 上传到阿里云oss
+        // this.handleUploadToOSS(data)
         let clientType = this.$setting.dynamicOutLinks.ObjectStorageClient ||
                         this.$store.state.dynamicOutLinks.ObjectStorageClient ||
                         JSON.parse(localStorage.getItem('dynamicOutLinks')).ObjectStorageClient
-        // 上传到 对象存储器 阿里云、mino
+        // 上传到 对象存储器
         uploadFileDirect(clientType,data,temName,options).then(url=>{
           console.log('文件地址',url);
           this.publishPPT(url)