Index.php 925 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Heanup\App\Api\Controller;
  3. use Heanup\App\Api\Controller;
  4. use Heanup\App\Api\Package\Database\Num;
  5. use Heanup\Library\Pager;
  6. use Heanup\Library\Sms\ReceiveSmsFree;
  7. class Index extends Controller
  8. {
  9. protected function main()
  10. {
  11. $country=$this->getQuery()->string("country");
  12. if ($country){
  13. $where=['country'=>"+".$country];
  14. }else{
  15. $where=[];
  16. }
  17. $page = $this->getQuery()->intval("page", 1);
  18. $pgSize = 20;
  19. // $country="+86";
  20. // $phone_num="17771934420";
  21. // $data = $lib->getMessage($country, $phone_num);
  22. // $data=$lib->getCountry();
  23. $this->_data = Num::getPageList($where, "", $page, $pgSize, ['id' => true]);
  24. $this->pager = Pager::pager($this->_data['total_count'], $pgSize, http_build_query($_GET), $page);
  25. $this->render();
  26. // $this->showSuccess($this->data);
  27. }
  28. }