SeatingController.php 550 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\index\controller\kefu;
  3. use think\exception\ValidateException;
  4. use app\model\kefu\Seating;
  5. class SeatingController extends Base
  6. {
  7. function index()
  8. {
  9. $where['status'] = 1;
  10. $field = 'id,title,chatid,touxiang,status,px';
  11. $query = Seating::where($where);
  12. $res = $query->field($field)
  13. ->order('id desc')
  14. ->select()
  15. ->toArray();
  16. $data['data'] = $res;
  17. return $this->json($data);
  18. }
  19. function listbygroups()
  20. {
  21. $res = Seating::getlistbygroups();
  22. $data['data'] = $res;
  23. return $this->json($data);
  24. }
  25. }