抓取后创建车辆优化

This commit is contained in:
2025-10-11 09:36:56 +08:00
parent cbf41a604a
commit e3572cde9e
+4 -2
View File
@@ -198,13 +198,15 @@ class BrandSeriesService
$official_price = $model["info"]['official_price'] * 10000;
}
$models[$key] = [
'model_name' => $model["info"]['year'] . '款 ' .$model["info"]['car_name'],
'title' => $model["info"]['year'] . '款 ' .$model["info"]['car_name'],
'brand_name' => $model["info"]['brand_name'],
'series_name' => $model["info"]['series_name'],
'year' => $model["info"]['year'],
'msrp' => $official_price,
'car_id' => $model["info"]['id'],
];
}
return $models;
return array_values($models);
} catch (\Exception $e) {
throw new \Exception($e->getMessage());
}