数据页搜索调试

master
zcstatham 2 years ago
parent 20f06539e9
commit 5fb2326d6b
  1. 4
      app/controller/Index.php

@ -338,11 +338,11 @@ class Index extends BaseController
$map[] = ['car_info_t.car_man', 'like', $car_man]; $map[] = ['car_info_t.car_man', 'like', $car_man];
} }
if (isset($params['tag']) && $params['tag'] != '') { if (isset($params['tag']) && $params['tag'] != '') {
$tags = explode(',', str_replace(',', '', $params['car_man'])); $tags = explode(',', str_replace(',', '', $params['tag']));
array_walk($tags, function (&$value) { array_walk($tags, function (&$value) {
$value = '%' . $value . '%'; $value = '%' . $value . '%';
}); });
$map[] = ['car_info_t.car_man', 'like', $tags]; $map[] = ['car_info_t.tag', 'like', $tags];
} }
if (isset($params['factory_model']) && $params['factory_model'] != '') { if (isset($params['factory_model']) && $params['factory_model'] != '') {
$factory_model = explode(',', str_replace(',', '', $params['factory_model'])); $factory_model = explode(',', str_replace(',', '', $params['factory_model']));

Loading…
Cancel
Save