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
@@ -52,17 +52,17 @@
</head>
<body>
<h2>联系人名片</h2>
<h2><?= $contactField['title'] ?></h2>
<div class="card">
<?php if (!empty($user['name'])): ?>
<div class="row"><span class="label">姓名:</span><?= $user['name'] ?></div>
<div class="row"><span class="label"><?= $contactField['name'] ?>:</span><?= $user['name'] ?></div>
<?php endif; ?>
<?php if (!empty($user['email'])): ?>
<div class="row"><span class="label">邮箱:</span><?= $user['email'] ?></div>
<div class="row"><span class="label"><?= $contactField['name'] ?>:</span><?= $user['email'] ?></div>
<?php endif; ?>
<?php if (!empty($user['phone'])): ?>
<div class="row"><span class="label">电话:</span><?= $user['phone'] ?></div>
<div class="row"><span class="label"><?= $contactField['name'] ?>:</span><?= $user['phone'] ?></div>
<?php endif; ?>
<?php if (!empty($user['whatsapp'])): ?>
<div class="row"><span class="label">WhatsApp:</span><?= $user['whatsapp'] ?></div>
@@ -70,7 +70,7 @@
<?php if (!empty($user['social']) && !empty($user['social_code'])): ?>
<div class="qrcode-wrap">
<div><?= $user['social'] ?> 二维码</div>
<div><?= $contactField['code'] ?></div>
<img style = "width: 270px;height: 270px;margin-top: 30px;" src="<?= $user['social_code'] ?>">
</div>
<?php endif; ?>
+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>