Institution.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace app\api\controller;
  3. use app\admin\model\institution\{Ade,Institution as Insti};
  4. use app\common\controller\Api;
  5. use app\common\model\AidStation;
  6. use liuniu\UtilService;
  7. use think\Request;
  8. class Institution extends Api
  9. {
  10. protected $noNeedLogin = [];
  11. protected $noNeedRight = ['*'];
  12. public function ade(Request $request)
  13. {
  14. list($latitude, $longitude, $page, $limit,$all) = UtilService::getMore(
  15. [
  16. ['latitude',''],
  17. ['longitude',''],
  18. ['page',1],
  19. ['limit',10],
  20. ['all',0],
  21. ],$request,true
  22. );
  23. if($all==0) $cid = $this->cid; else $cid=0;
  24. $this->success('获取成功',Ade::lst($cid,$latitude,$longitude,$page,$limit));
  25. }
  26. public function insti(Request $request)
  27. {
  28. list($latitude, $longitude, $page, $limit) = UtilService::getMore(
  29. [
  30. ['latitude',''],
  31. ['longitude',''],
  32. ['page',1],
  33. ['limit',10],
  34. ],$request,true
  35. );
  36. $this->success('获取成功',Insti::lst($this->cid,$latitude,$longitude,$page,$limit));
  37. }
  38. public function station(Request $request)
  39. {
  40. list($latitude, $longitude, $page, $limit) = UtilService::getMore(
  41. [
  42. ['latitude',''],
  43. ['longitude',''],
  44. ['page',1],
  45. ['limit',10],
  46. ],$request,true
  47. );
  48. $this->success('获取成功',AidStation::lst($this->cid,$latitude,$longitude,$page,$limit));
  49. }
  50. }