Talent.php 562 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\enterprise\controller;
  3. use app\enterprise\common\EnterpriseController;
  4. use app\enterprise\api\TalentApi;
  5. /**
  6. * Description of Talent
  7. *
  8. * @author sgq
  9. */
  10. class Talent extends EnterpriseController {
  11. public function index() {
  12. return view();
  13. }
  14. public function list() {
  15. $name = trim($this->request->param("roleName"));
  16. $where = [];
  17. if ($name) {
  18. $where = [["name", "like", "%" . $name . "%"]];
  19. }
  20. $list = TalentApi::getList($where);
  21. return json($list);
  22. }
  23. }