You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
772 B

  1. <?php
  2. namespace App\JsonRpc;
  3. use Hyperf\RpcServer\Annotation\RpcService;
  4. use Hyperf\Di\Annotation\Inject;
  5. /**
  6. * @RpcService(name="AlismsService", protocol="jsonrpc-http", server="jsonrpc-http", publishTo="")
  7. * Class AliSmsService
  8. * @package App\JsonRpc
  9. */
  10. class AlismsService implements SmsServiceInterface
  11. {
  12. /**
  13. * @Inject
  14. * @var \App\Service\SmsServiceInterface
  15. */
  16. private $smsAliService;
  17. /**
  18. * 阿里短信
  19. * @param $phone
  20. * @param $template
  21. * @param $templateParams
  22. * @param string $signName
  23. * @return array|bool
  24. */
  25. public function sent($phone, $template, $templateParams, $signName = '懒族生活')
  26. {
  27. return $this->smsAliService->send($phone, $template, $templateParams);
  28. }
  29. }