Переглянути джерело

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');