瀏覽代碼

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