用户搜索

This commit is contained in:
2025-08-05 17:58:10 +08:00
parent 40d3942a8c
commit ca18a05554
+7
View File
@@ -48,6 +48,13 @@ class UserService
case 'index':
$config['where']['status'] = 1;
$config['order']['id'] = 'desc';
// 关键字
if (isset($p['keyword']) && $p['keyword']) {
$k = '%' . $p['keyword'] . '%';
$config['where']['name'] = ['like', $k];
}
$config['fields'] = ['id', 'name', 'email', 'sex', 'phone', 'avatar', 'corp_id', 'country_id', 'position', 'status', 'created_at'];
break;
case 'show':