wesmiler 6 anni fa
parent
commit
87eb3520d9
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 7 3
      vendor/thinkcmf/cmf-app/src/weixin/model/Stroage.php

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

@@ -244,10 +244,14 @@ class Stroage extends Model
         if (in_array($fileType, $typeData)) {
         if (in_array($fileType, $typeData)) {
             if($fileType == 'docx'){
             if($fileType == 'docx'){
                 $file = Stroage::convertFile($file,'doc');
                 $file = Stroage::convertFile($file,'doc');
-            }else if($fileType == 'xls'){
-                $file = Stroage::convertFile($file,'xlsx');
             }
             }
-            $file = Stroage::onLineConvertFile($file);
+
+            if($fileType == 'xls' || $fileType == 'xlsx'){
+                $file = Stroage::convertFile($file,'pdf');
+            }else{
+                $file = Stroage::onLineConvertFile($file);
+            }
+
             return Stroage::getPdfFilePage($file);
             return Stroage::getPdfFilePage($file);
         }
         }