过滤
This commit is contained in:
@@ -89,6 +89,7 @@ class CustomerService
|
||||
$query->where(function ($query) use ($keyword) {
|
||||
$query->where('contacts', 'like', "%{$keyword}%")
|
||||
->orWhere('phone', 'like', "%{$keyword}%")
|
||||
->orWhere('email', 'like', "%{$keyword}%")
|
||||
->orWhere('WhatsApp', 'like', "%{$keyword}%")
|
||||
->orWhere('code', 'like', "%{$keyword}%");
|
||||
});
|
||||
@@ -154,9 +155,16 @@ class CustomerService
|
||||
switch ($scene) {
|
||||
case 'index':
|
||||
$config['where']['status'] = 1; // 关键字
|
||||
if (isset($p['user_id']) && $p['user_id']) {
|
||||
$config['where']['user_id'] = $p['user_id'];
|
||||
} // 关键字
|
||||
if (isset($p['keyword']) && $p['keyword']) {
|
||||
$k = '%' . $p['keyword'] . '%';
|
||||
$config['where']['contacts'] = ['like', $k];
|
||||
$config['where']['phone'] = ['like', $k];
|
||||
$config['where']['email'] = ['like', $k];
|
||||
$config['where']['WhatsApp'] = ['like', $k];
|
||||
$config['where']['code'] = ['like', $k];
|
||||
}
|
||||
$config['order']['id'] = 'desc';
|
||||
$config['dataLimit']['type'] = 'relation';
|
||||
|
||||
Reference in New Issue
Block a user