wesmiler 6 лет назад
Родитель
Сommit
87eb3520d9
1 измененных файлов с 7 добавлено и 3 удалено
  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($fileType == 'docx'){
                 $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);
         }