Преглед на файлове

bugfix: EK-0524: 结算后台无法下载PDF订单.

kevinElken преди 7 месеца
родител
ревизия
6324754b19
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      common/libs/export/BaseExport.php

+ 4 - 0
common/libs/export/BaseExport.php

@@ -831,6 +831,10 @@ ORDER;
             // 设置字体
             $pdf->SetFont('stsongstdlight', '', 10, '', true);
             $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
+            if (!file_exists($image)) {
+                $image = file_get_contents(\Yii::$app->runtimePath . '/uploads/ngds-logo.jpg');
+            }
+
             $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
             $pdf->writeHTML($context);
             $pdf->Output($realFile, 'F');