This commit is contained in:
2025-12-16 09:01:13 +08:00
parent ffcfe41025
commit cb8e25bd4f
+4 -1
View File
@@ -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']) {