diff --git a/app/common/service/VehVehicleSkuService.php b/app/common/service/VehVehicleSkuService.php index 0fa8649..e494122 100644 --- a/app/common/service/VehVehicleSkuService.php +++ b/app/common/service/VehVehicleSkuService.php @@ -91,10 +91,26 @@ class VehVehicleSkuService case 'default': $config['where']['is_active'] = 1; $config['order']['id'] = 'desc'; + + // 关键字筛选 + if (isset($p['keyword']) && $p['keyword']) { + $k = '%' . $p['keyword'] . '%'; + foreach (['model_name','series_name','brand_name',] as $col) { + $config['orWhere'][] = [$col, 'like', $k]; + } + } break; case 'index': $config['where']['is_active'] = 1; $config['order']['id'] = 'desc'; + + // 关键字筛选 + if (isset($p['keyword']) && $p['keyword']) { + $k = '%' . $p['keyword'] . '%'; + foreach (['model_name','series_name','brand_name',] as $col) { + $config['orWhere'][] = [$col, 'like', $k]; + } + } break; case 'show': $config['where']['id'] = $p['id'];