pdf改版

This commit is contained in:
2026-01-14 18:37:15 +08:00
parent 539494282c
commit 2126e65397
8 changed files with 465 additions and 26 deletions
+42 -16
View File
@@ -70,59 +70,85 @@
<table class="info-table">
<tr>
<td class="label">车价</td>
<td class="price">¥ <?= number_format($car['price'], 2) ?></td>
<td class="label"><?= $field['price'] ?></td>
<td class="price"><?= $field['currency'].' ' ?><?= number_format($car['price'], 2) ?></td>
</tr>
<tr>
<td class="label">车源地</td>
<td class="label"><?= $field['source_place'] ?></td>
<td><?= $car['source_place'] ?></td>
</tr>
<tr>
<td class="label">上牌时间</td>
<td class="label"><?= $field['plate_time'] ?></td>
<td><?= $car['plate_time'] ?></td>
</tr>
<tr>
<td class="label">排量</td>
<td class="label"><?= $field['displacement'] ?></td>
<td><?= $car['displacement'] ?></td>
</tr>
<tr>
<td class="label">里程</td>
<td class="label"><?= $field['mileage'] ?></td>
<td><?= $car['mileage'].'km' ?></td>
</tr>
<tr>
<td class="label">马力</td>
<td class="label"><?= $field['power'] ?></td>
<td><?= $car['power'] ?> </td>
</tr>
<tr>
<td class="label">车身颜色</td>
<td class="label"><?= $field['body_color'] ?></td>
<td><?= $car['body_color'] ?: '-' ?></td>
</tr>
<tr>
<td class="label">创建时间</td>
<td class="label"><?= $field['created_at'] ?></td>
<td><?= $car['created_at'] ?></td>
</tr>
</table>
<h2>车况介绍</h2>
<?php if (!empty($car['condition_desc'])): ?>
<h2><?= $field['condition_desc'] ?></h2>
<div class="desc">
<?= nl2br(htmlspecialchars($car['condition_desc'])) ?>
</div>
<?php endif; ?>
<h2>产品图</h2>
<div class="image-list">
<table width="100%" cellpadding="6" cellspacing="0">
<tr>
<thead>
<tr>
<th colspan="2" style="
font-size:28px;
font-weight:bold;
text-align:left;
padding:12px 0;
border-left:4px solid #1677ff;
padding-left:10px;
background:#fff;
">
<div style="
font-size:28px;
font-weight:bold;
padding:10px 0;
">
<?= $field['images'] ?>
</div>
</th >
</tr>
</thead>
<tbody>
<?php foreach ($car['images'] as $i => $img): ?>
<?php if ($i % 2 === 0): ?>
<tr>
<?php endif; ?>
<td width="50%" align="center">
<img src="<?= $img ?>" style="width:100%; border-radius:4px;">
</td>
<?php if (($i + 1) % 2 === 0): ?>
</tr><tr>
<?php if ($i % 2 === 1): ?>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</tr>
</tbody>
</table>
</div>