diff --git a/app/common/service/SkuService.php b/app/common/service/SkuService.php index 6275d1a..73256b4 100644 --- a/app/common/service/SkuService.php +++ b/app/common/service/SkuService.php @@ -48,6 +48,12 @@ class SkuService $config['order']['id'] = 'desc'; break; case 'index': + if (isset($p['keyword']) && $p['keyword']) { + $k = '%' . $p['keyword'] . '%'; + foreach (['product_name','model'] as $col) { + $config['orWhere'][] = [$col, 'like', $k]; + } + } $config['where']['status'] = 1; $config['order']['sort'] = 'desc'; $config['order']['id'] = 'desc';