车辆抓取
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
font-family: "sun-exta";
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 18px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 14px;
|
||||
margin: 20px 0 10px;
|
||||
border-left: 4px solid #1677ff;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.info-table td.label {
|
||||
width: 120px;
|
||||
color: #666;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 16px;
|
||||
color: #d4380d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.image-list {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.image-item {
|
||||
width: 48%;
|
||||
margin-bottom: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.image-item img {
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
line-height: 1.8;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1><?= htmlspecialchars($car['title']) ?></h1>
|
||||
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label">车价</td>
|
||||
<td class="price">¥ <?= number_format($car['price'], 2) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">车源地</td>
|
||||
<td><?= $car['source_city'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">上牌时间</td>
|
||||
<td><?= $car['register_date'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">排量</td>
|
||||
<td><?= $car['displacement'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">里程</td>
|
||||
<td><?= $car['mileage'] ?> km</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">马力</td>
|
||||
<td><?= $car['power'] ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">车身颜色</td>
|
||||
<td><?= $car['color'] ?: '-' ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">创建时间</td>
|
||||
<td><?= $car['created_at'] ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>产品图</h2>
|
||||
<div class="image-list">
|
||||
<?php foreach ($car['images'] as $img): ?>
|
||||
<div class="image-item">
|
||||
<img src="<?= $img ?>">
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<h2>车况介绍</h2>
|
||||
<div class="desc">
|
||||
<?= nl2br(htmlspecialchars($car['description'])) ?>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user