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.
36 lines
812 B
36 lines
812 B
<?php
|
|
|
|
|
|
namespace App\JsonRpc;
|
|
|
|
|
|
use App\Service\SmsAliService;
|
|
use Hyperf\RpcServer\Annotation\RpcService;
|
|
use Hyperf\Di\Annotation\Inject;
|
|
|
|
/**
|
|
* @RpcService(name="AlismsService", protocol="jsonrpc-http", server="jsonrpc-http", publishTo="")
|
|
* Class AliSmsService
|
|
* @package App\JsonRpc
|
|
*/
|
|
class AlismsService implements SmsServiceInterface
|
|
{
|
|
/**
|
|
* @Inject
|
|
* @var SmsAliService
|
|
*/
|
|
private $smsAliService;
|
|
|
|
/**
|
|
* 阿里短信
|
|
* @param $phone
|
|
* @param $template
|
|
* @param $templateParams
|
|
* @param string $signName
|
|
* @return array|bool
|
|
*/
|
|
public function sent($phone, $template, $templateParams, $signName = '懒族生活')
|
|
{
|
|
return $this->smsAliService->send($phone, $template, $templateParams, $signName = '懒族生活');
|
|
}
|
|
}
|