Index.php 954 B

12345678910111213141516171819202122232425262728293031323334
  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. $where['status']=1;
  18. $page = $this->getQuery()->intval("page", 1);
  19. $pgSize = 20;
  20. // $country="+86";
  21. // $phone_num="17771934420";
  22. // $data = $lib->getMessage($country, $phone_num);
  23. // $data=$lib->getCountry();
  24. $this->_data = Num::getPageList($where, "", $page, $pgSize, ['id' => true]);
  25. $this->pager = Pager::pager($this->_data['total_count'], $pgSize, "/?".http_build_query($_GET), $page);
  26. $this->render();
  27. // $this->showSuccess($this->data);
  28. }
  29. }