wesmiler %!s(int64=6) %!d(string=hai) anos
pai
achega
3d2f593192
Modificáronse 1 ficheiros con 7 adicións e 8 borrados
  1. 7 8
      vendor/thinkcmf/cmf-app/src/weixin/model/Stroage.php

+ 7 - 8
vendor/thinkcmf/cmf-app/src/weixin/model/Stroage.php

@@ -225,26 +225,25 @@ class Stroage extends Model
         }
 
         // 表格文件转PDF
-//        if(in_array($fileType, ['xls','xlsx','doc','docx'])){
-        if(in_array($fileType, ['xls','xlsx'])){
+        if(in_array($fileType, ['xls','xlsx','doc','docx'])){
+//        if(in_array($fileType, ['xls','xlsx'])){
             $file = Stroage::convertFile($file);
             return Stroage::getPdfFilePage($file);
         }
 
         // 其他文件
         $fileTypes = config('files.fileTypes');
-//         $fileTypes = $fileTypes? $fileTypes : ['doc','docx','ppt','pptx'];
-        $fileTypes = $fileTypes? $fileTypes : ['ppt','pptx'];
+        $fileTypes = $fileTypes? $fileTypes : ['doc','docx','ppt','pptx'];
+//        $fileTypes = $fileTypes? $fileTypes : ['ppt','pptx'];
         if(!in_array($fileType, $fileTypes)){
             return 0;
         }
 
-        echo $file."\n";
         // doc转docx
-        if($fileType == 'doc'){
+        /*if($fileType == 'doc'){
             $file = Stroage::convertFile($file, 'docx');
-        }
-echo $file."\n";
+        }*/
+//echo $file."\n";
         $zipFile = Stroage::moveFileToZip($file);
         if(!is_file($zipFile)){
             return 0;