This commit is contained in:
2026-01-15 10:30:48 +08:00
parent 45a7021aea
commit 842d502bf0
4 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -116,7 +116,7 @@ class MpdfDriver
return [$css, $html];
}
public function exportUsedCarPdf($field,$car,$user,$contactField,$contact)
public function exportUsedCarPdf($field,$car,$user,$contactField,$contact,$lang)
{
/*$car = [
'title' => '奥迪Q3 2013款 35 TFSI 舒适型',
@@ -186,7 +186,7 @@ class MpdfDriver
$pdf = $mpdf->Output('车辆详情.pdf', 'S');
$dir = runtime_path('pdf');
if (!is_dir($dir)) mkdir($dir, 0777, true);
$pdfName = 'invoice-' . date('YmdHis').'-'.$car['id'] . '.pdf';
$pdfName = 'invoice-' . date('YmdHis').'-'.$car['id'] . '-' . $lang . '.pdf';
$path = $dir . '/' . $pdfName;
file_put_contents($path, $pdf);