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.

35 lines
812 B

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