diff --git a/app/common/service/PostService.php b/app/common/service/PostService.php index 3c4ca20..542d425 100644 --- a/app/common/service/PostService.php +++ b/app/common/service/PostService.php @@ -70,7 +70,10 @@ class PostService ]; } if (isset($p['keyword']) && $p['keyword']) { - $config['where']['content'] = ['like', '%'.$p['keyword'].'%']; + $k = '%' . $p['keyword'] . '%'; + foreach (['model','content'] as $col) { + $config['orWhere'][] = [$col, 'like', $k]; + } } if (isset($p['status']) && $p['status']) {