网站车辆筛选
This commit is contained in:
@@ -61,7 +61,7 @@ class BrandService extends BaseService
|
||||
],
|
||||
];
|
||||
},
|
||||
'hot' => function ($params) {
|
||||
'show' => function ($params) {
|
||||
return [
|
||||
'filters' => [
|
||||
['field' => 'status', 'operator' => '=', 'value' => '1'],
|
||||
@@ -69,7 +69,11 @@ class BrandService extends BaseService
|
||||
],
|
||||
'fields' => ['id', 'status', 'sort', 'toppic', 'descpic', 'logo', 'letter', 'is_hot', 'created_at', 'updated_at'],
|
||||
'relations' => [
|
||||
'translation' => ['brand_id', 'name']
|
||||
'translation' => ['brand_id', 'name', 'desc','toppic_alt','descpic_alt','logo_alt'],
|
||||
'banners' => ['id', 'pic', 'sort',],
|
||||
'banners.translation' => ['id', 'alt',],
|
||||
'traits' => ['id', 'sort',],
|
||||
'traits.translation' => ['id', 'title', 'content',],
|
||||
],
|
||||
'sorts' => [
|
||||
['field' => 'id', 'direction' => 'desc']
|
||||
|
||||
@@ -29,9 +29,7 @@ class VehicleNewService extends BaseService
|
||||
'default' => function ($params) {
|
||||
$keyword = $params['keyword'] ?? '';
|
||||
return [
|
||||
'filters' => [
|
||||
// ['field' => '***', 'operator' => '=', 'value' => '***']
|
||||
],
|
||||
'filters' => $params['filters'],
|
||||
'fields' => ['id', 'vin', 'brand', 'cover', 'price', 'type', 'energy', 'model', 'video', 'views', 'created_at', 'updated_at'],
|
||||
'relations' => [
|
||||
'translation' => ['vehicle_id', 'locale', 'name', 'condition_desc', 'location'],
|
||||
|
||||
Reference in New Issue
Block a user