Message.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace Heanup\App\Api\Controller;
  3. use Heanup\App\Api\Config\SiteRule;
  4. use Heanup\App\Api\Package\Database\Num;
  5. use Heanup\App\Api\RestfulController;
  6. use Heanup\Library\Sms;
  7. use Heanup\Library\Sms\ReceiveSmsFree;
  8. class Message extends RestfulController
  9. {
  10. public $message;
  11. /**
  12. * @var array
  13. */
  14. public $number_info;
  15. /**
  16. * @inheritDoc
  17. */
  18. protected function getData()
  19. {
  20. $id=$this->getQuery()->intval("id");
  21. $num_info=Num::getLine($id);
  22. if ($num_info){
  23. $lib_class=SiteRule::getData($num_info['site']);
  24. $lib=new Sms($lib_class);
  25. $this->message=$lib->getMessage($num_info['country'], $num_info['phone']);
  26. $this->number_info=$num_info;
  27. // $this->showSuccess($this->message);
  28. $this->render();
  29. }
  30. }
  31. /**
  32. * @inheritDoc
  33. */
  34. protected function postData()
  35. {
  36. }
  37. /**
  38. * @inheritDoc
  39. */
  40. protected function putData()
  41. {
  42. }
  43. /**
  44. * @inheritDoc
  45. */
  46. protected function deleteData()
  47. {
  48. }
  49. }