Browse Source

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

kevinElken 7 months ago
parent
commit
562751a914

+ 3 - 3
common/libs/export/BaseExport.php

@@ -834,7 +834,7 @@ ORDER;
 //        if (!file_exists($image_file)) {
 //            $image_file = \Yii::$app->runtimePath . '/../common/uploads/ngds-logo.jpg';
 //        }
-            $image_file = \Yii::$app->runtimePath . '/../ngds-logo.jpg';
+            $image_file = \Yii::$app->basePath . '/../ngds-logo.jpg';
             $image = file_get_contents($image_file);
 
             $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
@@ -1114,7 +1114,7 @@ ORDER;
 //        if (!file_exists($image_file)) {
 //            $image_file = \Yii::$app->runtimePath . '/../common/uploads/ngds-logo.jpg';
 //        }
-            $image_file = \Yii::$app->runtimePath . '/../ngds-logo.jpg';
+            $image_file = \Yii::$app->basePath . '/../ngds-logo.jpg';
             $image = file_get_contents($image_file);
             $pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
             $pdf->writeHTML($context);
@@ -1515,7 +1515,7 @@ ORDER;
 //        if (!file_exists($image_file)) {
 //            $image_file = \Yii::$app->runtimePath . '/../common/uploads/ngds-logo.jpg';
 //        }
-            $image_file = \Yii::$app->runtimePath . '/../ngds-logo.jpg';
+            $image_file = \Yii::$app->basePath . '/../ngds-logo.jpg';
             $image = file_get_contents($image_file);
             $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
             $pdf->writeHTML($context);

+ 3 - 3
frontendApi/modules/v1/controllers/ShopController.php

@@ -1050,7 +1050,7 @@ ORDER;
 //        if (!file_exists($image_file)) {
 //            $image_file = \Yii::$app->runtimePath . '/../common/uploads/ngds-logo.jpg';
 //        }
-        $image_file = \Yii::$app->runtimePath . '/../ngds-logo.jpg';
+        $image_file = \Yii::$app->basePath . '/../ngds-logo.jpg';
         $image = file_get_contents($image_file);
         $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
         $pdf->writeHTML($context);
@@ -1319,7 +1319,7 @@ ORDER;
 //        if (!file_exists($image_file)) {
 //            $image_file = \Yii::$app->runtimePath . '/../common/uploads/ngds-logo.jpg';
 //        }
-        $image_file = \Yii::$app->runtimePath . '/../ngds-logo.jpg';
+        $image_file = \Yii::$app->basePath . '/../ngds-logo.jpg';
         $image = file_get_contents($image_file);
         $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
         $pdf->writeHTML($context);
@@ -1894,7 +1894,7 @@ ORDER;
 //        if (!file_exists($image_file)) {
 //            $image_file = \Yii::$app->runtimePath . '/../common/uploads/ngds-logo.jpg';
 //        }
-        $image_file = \Yii::$app->runtimePath . '/../ngds-logo.jpg';
+        $image_file = \Yii::$app->basePath . '/../ngds-logo.jpg';
         $image = file_get_contents($image_file);
 
         $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');