add
This commit is contained in:
parent
6a87209f9c
commit
c1b432d795
|
@ -133,7 +133,16 @@ class UserController extends BaseAdminController
|
||||||
//分页
|
//分页
|
||||||
$pageNo = $this->request->get('page_no',1);
|
$pageNo = $this->request->get('page_no',1);
|
||||||
$pageSize = $this->request->get('page_size', 25);
|
$pageSize = $this->request->get('page_size', 25);
|
||||||
$list = VillagerInformation::page($pageNo,$pageSize)->select()->toArray();
|
$query = VillagerInformation::page($pageNo,$pageSize);
|
||||||
|
$name = $this->request->get('name', '');
|
||||||
|
$contact = $this->request->get('contact', '');
|
||||||
|
if ($name) {
|
||||||
|
$query->where('name', 'like', '%' . $name . '%');
|
||||||
|
}
|
||||||
|
if ($contact) {
|
||||||
|
$query->where('contact', '=', $contact);
|
||||||
|
}
|
||||||
|
$list = $query->select()->toArray();
|
||||||
return $this->success('成功', compact('list'));
|
return $this->success('成功', compact('list'));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue